From 701e943001f2bbca441a2779cdb243f8befda07a Mon Sep 17 00:00:00 2001 From: samson0v Date: Fri, 20 Aug 2021 11:34:34 +0300 Subject: [PATCH 1/2] Updated models and apis --- .gitignore | 3 + tb_rest_client/__init__.py | 70 - tb_rest_client/api/__init__.py | 15 - tb_rest_client/api/api_ce/__init__.py | 75 +- .../api/api_ce/admin_controller_api.py | 275 ++- .../api/api_ce/alarm_controller_api.py | 281 ++- .../api/api_ce/asset_controller_api.py | 1018 +++++---- .../api/api_ce/audit_log_controller_api.py | 332 +-- .../api/api_ce/auth_controller_api.py | 339 ++- .../component_descriptor_controller_api.py | 77 +- .../api/api_ce/customer_controller_api.py | 166 +- .../api/api_ce/dashboard_controller_api.py | 1160 +++++------ .../api/api_ce/device_controller_api.py | 1227 +++++------ .../api_ce/device_profile_controller_api.py | 105 +- .../api/api_ce/edge_controller_api.py | 285 +-- .../api/api_ce/edge_event_controller_api.py | 19 +- .../api/api_ce/entity_query_controller_api.py | 437 ++++ .../api_ce/entity_relation_controller_api.py | 290 ++- .../api/api_ce/entity_view_controller_api.py | 1153 +++++------ .../api/api_ce/event_controller_api.py | 233 ++- .../api/api_ce/lwm_2m_controller_api.py | 21 +- ...o_auth_2_config_template_controller_api.py | 304 +++ .../api/api_ce/o_auth_2_controller_api.py | 393 ++++ .../api/api_ce/ota_package_controller_api.py | 143 +- .../api/api_ce/queue_controller_api.py | 42 +- .../api/api_ce/rpc_v_1_controller_api.py | 243 +++ .../api/api_ce/rpc_v_2_controller_api.py | 554 +++++ .../api/api_ce/rule_chain_controller_api.py | 1128 +++++----- .../api/api_ce/sign_up_controller_api.py | 741 +++++++ .../api/api_ce/tb_resource_controller_api.py | 105 +- .../api/api_ce/telemetry_controller_api.py | 366 ++-- .../api/api_ce/tenant_controller_api.py | 354 ++-- .../api_ce/tenant_profile_controller_api.py | 97 +- .../api/api_ce/user_controller_api.py | 444 ++-- .../api/api_ce/widget_type_controller_api.py | 366 ++-- .../api_ce/widgets_bundle_controller_api.py | 144 +- tb_rest_client/api/api_pe/__init__.py | 97 +- .../api/api_pe/admin_controller_api.py | 593 +++++- .../api/api_pe/asset_controller_api.py | 681 +++++- .../api_pe/billing_endpoint_controller_api.py | 249 +-- .../api/api_pe/blob_entity_controller_api.py | 102 +- .../chirp_stack_integration_controller_api.py | 325 ++- .../api_pe/cloud_endpoint_controller_api.py | 19 +- .../api/api_pe/converter_controller_api.py | 210 +- .../api/api_pe/custom_menu_controller_api.py | 74 +- .../custom_translation_controller_api.py | 92 +- .../api/api_pe/customer_controller_api.py | 591 +++++- .../api/api_pe/dashboard_controller_api.py | 1763 +++++++++++++--- .../api/api_pe/device_controller_api.py | 1594 ++++++++++++-- ...device_group_ota_package_controller_api.py | 320 +++ .../api/api_pe/edge_controller_api.py | 1843 +++++++++++++++++ .../api/api_pe/edge_event_controller_api.py | 162 ++ .../api/api_pe/entity_group_controller_api.py | 1079 ++++++---- .../api/api_pe/entity_view_controller_api.py | 451 +++- .../api_pe/group_permission_controller_api.py | 172 +- .../api_pe/http_integration_controller_api.py | 138 +- .../api/api_pe/integration_controller_api.py | 336 ++- .../loriot_integration_controller_api.py | 329 ++- .../api/api_pe/lwm_2m_controller_api.py | 223 ++ ...cean_connect_integration_controller_api.py | 376 ++-- .../api/api_pe/ota_package_controller_api.py | 986 +++++++++ .../api/api_pe/owner_controller_api.py | 62 +- .../api/api_pe/report_controller_api.py | 98 +- .../api/api_pe/role_controller_api.py | 124 +- .../api/api_pe/rpc_controller_api.py | 243 +++ .../api/api_pe/rpc_v_2_controller_api.py | 554 +++++ .../api/api_pe/rule_engine_controller_api.py | 134 +- .../api_pe/scheduler_event_controller_api.py | 548 ++++- .../self_registration_controller_api.py | 197 +- .../sig_fox_integration_controller_api.py | 378 ++-- .../api/api_pe/sign_up_controller_api.py | 319 ++- .../api/api_pe/solution_controller_api.py | 43 +- .../api/api_pe/subscription_controller_api.py | 19 +- ...bile_iot_cdp_integration_controller_api.py | 378 ++-- .../api/api_pe/tenant_controller_api.py | 543 ++++- .../thing_park_integration_controller_api.py | 882 ++++---- .../api/api_pe/trail_controller_api.py | 46 +- .../api/api_pe/user_controller_api.py | 799 ++++++- .../api_pe/user_permissions_controller_api.py | 42 +- .../api_pe/white_labeling_controller_api.py | 292 +-- tb_rest_client/api_client.py | 4 +- tb_rest_client/configuration.py | 14 +- tb_rest_client/models/__init__.py | 15 - tb_rest_client/models/models_ce/__init__.py | 268 ++- .../models/models_ce/admin_settings.py | 30 +- .../models/models_ce/admin_settings_id.py | 32 +- tb_rest_client/models/models_ce/alarm.py | 60 +- .../models/models_ce/alarm_condition.py | 136 ++ .../models_ce/alarm_condition_filter.py | 194 ++ .../models_ce/alarm_condition_filter_key.py | 142 ++ .../models/models_ce/alarm_condition_spec.py | 84 + tb_rest_client/models/models_ce/alarm_data.py | 590 ++++++ .../models/models_ce/alarm_data_page_link.py | 417 ++++ .../models/models_ce/alarm_data_query.py | 240 +++ tb_rest_client/models/models_ce/alarm_id.py | 80 +- tb_rest_client/models/models_ce/alarm_info.py | 60 +- tb_rest_client/models/models_ce/alarm_rule.py | 188 ++ .../models/models_ce/alarm_schedule.py | 116 ++ tb_rest_client/models/models_ce/asset.py | 32 +- tb_rest_client/models/models_ce/asset_id.py | 80 +- tb_rest_client/models/models_ce/asset_info.py | 344 +++ .../models/models_ce/asset_search_query.py | 30 +- .../models_ce/attributes_entity_view.py | 32 +- tb_rest_client/models/models_ce/audit_log.py | 34 +- .../models/models_ce/audit_log_id.py | 32 +- .../models/models_ce/byte_buffer.py | 292 +++ .../models/models_ce/claim_request.py | 30 +- .../models/models_ce/component_descriptor.py | 30 +- .../models_ce/component_descriptor_id.py | 30 +- tb_rest_client/models/models_ce/customer.py | 30 +- .../models/models_ce/customer_id.py | 80 +- tb_rest_client/models/models_ce/dashboard.py | 112 +- .../models/models_ce/dashboard_id.py | 82 +- .../models/models_ce/dashboard_info.py | 110 +- .../default_rule_chain_create_request.py | 110 + .../deferred_result_response_entity.py | 30 +- tb_rest_client/models/models_ce/device.py | 137 +- .../models/models_ce/device_configuration.py | 84 + .../models/models_ce/device_credentials.py | 34 +- .../models/models_ce/device_credentials_id.py | 30 +- .../models/models_ce/device_data.py | 136 ++ tb_rest_client/models/models_ce/device_id.py | 78 +- .../models/models_ce/device_info.py | 474 +++++ .../models/models_ce/device_profile.py | 26 +- .../models/models_ce/device_profile_alarm.py | 240 +++ .../models_ce/device_profile_configuration.py | 84 + .../models/models_ce/device_profile_data.py | 188 ++ .../models/models_ce/device_profile_id.py | 17 +- .../models/models_ce/device_profile_info.py | 252 +++ .../device_profile_provision_configuration.py | 110 + .../device_profile_transport_configuration.py | 84 + .../models/models_ce/device_search_query.py | 30 +- .../device_transport_configuration.py | 84 + tb_rest_client/models/models_ce/edge.py | 17 +- tb_rest_client/models/models_ce/edge_event.py | 23 +- .../models/models_ce/edge_event_id.py | 17 +- tb_rest_client/models/models_ce/edge_id.py | 17 +- tb_rest_client/models/models_ce/edge_info.py | 17 +- .../models/models_ce/edge_search_query.py | 17 +- .../models/models_ce/entity_count_query.py | 136 ++ .../models/models_ce/entity_data.py | 162 ++ .../models/models_ce/entity_data_page_link.py | 219 ++ .../models/models_ce/entity_data_query.py | 214 ++ .../models_ce/entity_data_sort_order.py | 142 ++ .../models/models_ce/entity_filter.py | 84 + tb_rest_client/models/models_ce/entity_id.py | 52 +- .../models/models_ce/entity_info.py | 136 ++ tb_rest_client/models/models_ce/entity_key.py | 144 ++ .../models/models_ce/entity_relation.py | 34 +- .../models/models_ce/entity_relation_info.py | 34 +- .../models_ce/entity_relations_query.py | 38 +- .../models/models_ce/entity_subtype.py | 32 +- .../models/models_ce/entity_view.py | 30 +- .../models/models_ce/entity_view_id.py | 54 +- .../models/models_ce/entity_view_info.py | 422 ++++ .../models_ce/entity_view_search_query.py | 30 +- tb_rest_client/models/models_ce/event.py | 30 +- .../models/models_ce/event_filter.py | 84 + tb_rest_client/models/models_ce/event_id.py | 30 +- tb_rest_client/models/models_ce/file.py | 17 +- .../models/models_ce/home_dashboard.py | 370 ++++ .../models/models_ce/home_dashboard_info.py | 136 ++ .../models/models_ce/input_stream.py | 84 + tb_rest_client/models/models_ce/key_filter.py | 168 ++ .../models/models_ce/key_filter_predicate.py | 84 + .../models/models_ce/lw_m2m_instance.py | 17 +- .../models/models_ce/lw_m2m_object.py | 17 +- .../models_ce/lw_m2m_resource_observe.py | 17 +- .../models/models_ce/mapstring_ts_value.py | 89 + .../models/models_ce/node_connection_info.py | 30 +- .../models_ce/o_auth2_basic_mapper_config.py | 298 +++ .../models/models_ce/o_auth2_client_info.py | 86 +- .../o_auth2_client_registration_template.py | 526 +++++ ...o_auth2_client_registration_template_id.py | 110 + .../models_ce/o_auth2_custom_mapper_config.py | 188 ++ .../models/models_ce/o_auth2_domain_info.py | 142 ++ .../models/models_ce/o_auth2_info.py | 136 ++ .../models/models_ce/o_auth2_mapper_config.py | 220 ++ .../models/models_ce/o_auth2_mobile_info.py | 136 ++ .../models/models_ce/o_auth2_params_info.py | 162 ++ .../models_ce/o_auth2_registration_info.py | 455 ++++ .../models/models_ce/object_node.py | 84 + .../models/models_ce/ota_package.py | 49 +- .../models/models_ce/ota_package_id.py | 17 +- .../models/models_ce/ota_package_info.py | 49 +- ...ckage_idchecksumchecksum_algorithm_body.py | 113 + .../models/models_ce/page_data_alarm_data.py | 188 ++ .../models/models_ce/page_data_alarm_info.py | 188 ++ .../models/models_ce/page_data_asset.py | 188 ++ .../models/models_ce/page_data_asset_info.py | 188 ++ .../models/models_ce/page_data_audit_log.py | 188 ++ .../models/models_ce/page_data_customer.py | 188 ++ .../models_ce/page_data_dashboard_info.py | 188 ++ .../models/models_ce/page_data_device.py | 188 ++ .../models/models_ce/page_data_device_info.py | 188 ++ .../models_ce/page_data_device_profile.py | 188 ++ .../page_data_device_profile_info.py | 188 ++ .../models/models_ce/page_data_edge.py | 188 ++ .../models/models_ce/page_data_edge_event.py | 188 ++ .../models/models_ce/page_data_edge_info.py | 188 ++ .../models/models_ce/page_data_entity_data.py | 188 ++ .../models/models_ce/page_data_entity_info.py | 188 ++ .../models/models_ce/page_data_entity_view.py | 188 ++ .../models_ce/page_data_entity_view_info.py | 188 ++ .../models/models_ce/page_data_event.py | 188 ++ .../models_ce/page_data_ota_package_info.py | 188 ++ .../models/models_ce/page_data_rpc.py | 188 ++ .../models/models_ce/page_data_rule_chain.py | 188 ++ .../models_ce/page_data_tb_resource_info.py | 188 ++ .../models/models_ce/page_data_tenant.py | 188 ++ .../models/models_ce/page_data_tenant_info.py | 188 ++ .../models_ce/page_data_tenant_profile.py | 188 ++ .../models/models_ce/page_data_user.py | 188 ++ .../models_ce/page_data_widgets_bundle.py | 188 ++ .../models_ce/relation_entity_type_filter.py | 145 ++ .../models_ce/relations_search_parameters.py | 36 +- tb_rest_client/models/models_ce/resource.py | 292 +++ .../models/models_ce/response_entity.py | 30 +- tb_rest_client/models/models_ce/rpc.py | 324 +++ tb_rest_client/models/models_ce/rpc_id.py | 110 + tb_rest_client/models/models_ce/rule_chain.py | 70 +- .../models_ce/rule_chain_connection_info.py | 32 +- .../models/models_ce/rule_chain_data.py | 136 ++ .../models/models_ce/rule_chain_id.py | 80 +- .../models/models_ce/rule_chain_meta_data.py | 30 +- tb_rest_client/models/models_ce/rule_node.py | 32 +- .../models/models_ce/rule_node_id.py | 78 +- .../save_ota_package_info_request.py | 538 +++++ .../models/models_ce/security_settings.py | 32 +- .../models_ce/server_security_config.py | 318 +++ .../models/models_ce/short_customer_info.py | 30 +- .../models/models_ce/sign_up_request.py | 214 ++ .../models_ce/sms_provider_configuration.py | 84 + .../models/models_ce/tb_resource.py | 20 +- .../models/models_ce/tb_resource_id.py | 17 +- .../models/models_ce/tb_resource_info.py | 20 +- .../models/models_ce/telemetry_entity_view.py | 30 +- tb_rest_client/models/models_ce/tenant.py | 110 +- tb_rest_client/models/models_ce/tenant_id.py | 80 +- .../models/models_ce/tenant_info.py | 500 +++++ .../models/models_ce/tenant_profile.py | 17 +- .../models_ce/tenant_profile_configuration.py | 15 +- .../models/models_ce/tenant_profile_data.py | 17 +- .../models/models_ce/tenant_profile_id.py | 17 +- .../models/models_ce/test_sms_request.py | 162 ++ tb_rest_client/models/models_ce/ts_value.py | 136 ++ .../models/models_ce/update_message.py | 30 +- tb_rest_client/models/models_ce/uri.py | 526 +++++ tb_rest_client/models/models_ce/url.py | 370 ++++ .../models/models_ce/url_stream_handler.py | 84 + tb_rest_client/models/models_ce/user.py | 30 +- tb_rest_client/models/models_ce/user_id.py | 78 +- .../models/models_ce/user_password_policy.py | 30 +- .../models/models_ce/widget_type.py | 30 +- .../models/models_ce/widget_type_details.py | 318 +++ .../models/models_ce/widget_type_id.py | 80 +- .../models/models_ce/widget_type_info.py | 318 +++ .../models/models_ce/widgets_bundle.py | 66 +- .../models/models_ce/widgets_bundle_id.py | 80 +- tb_rest_client/models/models_pe/__init__.py | 196 +- .../models_pe/allowed_permissions_info.py | 42 +- tb_rest_client/models/models_pe/asset.py | 300 ++- tb_rest_client/models/models_pe/asset_id.py | 111 + tb_rest_client/models/models_pe/audit_log.py | 386 +++- .../models/models_pe/blob_entity_id.py | 110 + .../models/models_pe/blob_entity_info.py | 58 +- .../blob_entity_with_customer_info.py | 60 +- .../models_pe/client_registration_dto.py | 422 ++++ .../models/models_pe/component_descriptor.py | 282 ++- .../models/models_pe/contact_basedobject.py | 30 +- tb_rest_client/models/models_pe/converter.py | 30 +- .../models/models_pe/converter_id.py | 111 + .../models/models_pe/custom_menu.py | 30 +- .../models/models_pe/custom_menu_item.py | 86 +- .../models/models_pe/custom_translation.py | 30 +- tb_rest_client/models/models_pe/customer.py | 32 +- tb_rest_client/models/models_pe/dashboard.py | 112 +- .../models/models_pe/dashboard_info.py | 112 +- .../models/models_pe/delete_tenant_request.py | 136 ++ tb_rest_client/models/models_pe/device.py | 144 +- .../models_pe/device_group_ota_package.py | 220 ++ .../{device-profile.py => device_profile.py} | 27 +- .../models/models_pe/domain_info.py | 142 ++ tb_rest_client/models/models_pe/edge.py | 448 ++++ tb_rest_client/models/models_pe/edge_event.py | 356 ++++ .../models/models_pe/entity_data.py | 214 ++ .../models/models_pe/entity_group.py | 60 +- .../models/models_pe/entity_group_id.py | 110 + .../models/models_pe/entity_group_info.py | 62 +- tb_rest_client/models/models_pe/entity_id.py | 142 ++ .../models/models_pe/entity_relation.py | 34 +- .../models/models_pe/entity_relation_info.py | 34 +- .../models/models_pe/entity_subtype.py | 32 +- .../models/models_pe/entity_view.py | 32 +- .../models/models_pe/entity_view_id.py | 143 ++ tb_rest_client/models/models_pe/favicon.py | 32 +- .../models/models_pe/group_permission.py | 63 +- .../models/models_pe/group_permission_id.py | 142 ++ .../models/models_pe/group_permission_info.py | 34 +- .../models/models_pe/home_dashboard.py | 396 ++++ .../models/models_pe/http_routing_key_body.py | 113 + .../models/models_pe/integration.py | 62 +- .../models/models_pe/integration_id.py | 111 + .../models_pe/login_white_labeling_params.py | 86 +- .../models_pe/merged_group_permission_info.py | 36 +- .../merged_group_type_permission_info.py | 32 +- .../models_pe/merged_user_permissions.py | 116 +- .../models_pe/o_auth2_basic_mapper_config.py | 350 ++++ .../o_auth2_clients_domain_params.py | 136 ++ .../models_pe/o_auth2_clients_params.py | 136 ++ ...age_data_blob_entity_with_customer_info.py | 30 +- .../page_data_contact_basedobject.py | 30 +- .../models/models_pe/page_data_converter.py | 30 +- .../models_pe/page_data_entity_group_info.py | 188 ++ .../models/models_pe/page_data_integration.py | 30 +- .../models/models_pe/page_data_role.py | 30 +- .../page_data_scheduler_event_info.py | 188 ++ .../models_pe/page_data_short_entity_view.py | 32 +- tb_rest_client/models/models_pe/palette.py | 30 +- .../models/models_pe/palette_settings.py | 30 +- .../models_pe/relation_entity_type_filter.py | 145 ++ .../models_pe/relations_search_parameters.py | 36 +- .../models/models_pe/report_config.py | 32 +- tb_rest_client/models/models_pe/role.py | 32 +- tb_rest_client/models/models_pe/role_id.py | 142 ++ .../models/models_pe/scheduler_event.py | 32 +- .../models/models_pe/scheduler_event_id.py | 110 + .../models/models_pe/scheduler_event_info.py | 30 +- .../scheduler_event_with_customer_info.py | 32 +- .../models_pe/self_registration_params.py | 138 +- .../models/models_pe/share_group_request.py | 245 +++ .../models/models_pe/short_entity_view.py | 30 +- .../models/models_pe/sign_up_request.py | 84 +- .../sign_up_self_registration_params.py | 30 +- .../models_pe/solution_install_response.py | 188 ++ .../models/models_pe/subscription_usage.py | 17 +- .../tenant_solution_template_details.py | 20 +- .../tenant_solution_template_info.py | 20 +- .../tenant_solution_template_instructions.py | 17 +- tb_rest_client/models/models_pe/user.py | 30 +- tb_rest_client/models/models_pe/user_id.py | 111 + .../models/models_pe/white_labeling_params.py | 32 +- tb_rest_client/rest_client_base.py | 1409 ++++++------- tb_rest_client/rest_client_ce.py | 840 ++++---- tb_rest_client/rest_client_pe.py | 1606 +++++++------- 345 files changed, 53231 insertions(+), 14376 deletions(-) create mode 100644 tb_rest_client/api/api_ce/entity_query_controller_api.py create mode 100644 tb_rest_client/api/api_ce/o_auth_2_config_template_controller_api.py create mode 100644 tb_rest_client/api/api_ce/o_auth_2_controller_api.py create mode 100644 tb_rest_client/api/api_ce/rpc_v_1_controller_api.py create mode 100644 tb_rest_client/api/api_ce/rpc_v_2_controller_api.py create mode 100644 tb_rest_client/api/api_ce/sign_up_controller_api.py create mode 100644 tb_rest_client/api/api_pe/device_group_ota_package_controller_api.py create mode 100644 tb_rest_client/api/api_pe/edge_controller_api.py create mode 100644 tb_rest_client/api/api_pe/edge_event_controller_api.py create mode 100644 tb_rest_client/api/api_pe/lwm_2m_controller_api.py create mode 100644 tb_rest_client/api/api_pe/ota_package_controller_api.py create mode 100644 tb_rest_client/api/api_pe/rpc_controller_api.py create mode 100644 tb_rest_client/api/api_pe/rpc_v_2_controller_api.py create mode 100644 tb_rest_client/models/models_ce/alarm_condition.py create mode 100644 tb_rest_client/models/models_ce/alarm_condition_filter.py create mode 100644 tb_rest_client/models/models_ce/alarm_condition_filter_key.py create mode 100644 tb_rest_client/models/models_ce/alarm_condition_spec.py create mode 100644 tb_rest_client/models/models_ce/alarm_data.py create mode 100644 tb_rest_client/models/models_ce/alarm_data_page_link.py create mode 100644 tb_rest_client/models/models_ce/alarm_data_query.py create mode 100644 tb_rest_client/models/models_ce/alarm_rule.py create mode 100644 tb_rest_client/models/models_ce/alarm_schedule.py create mode 100644 tb_rest_client/models/models_ce/asset_info.py create mode 100644 tb_rest_client/models/models_ce/byte_buffer.py create mode 100644 tb_rest_client/models/models_ce/default_rule_chain_create_request.py create mode 100644 tb_rest_client/models/models_ce/device_configuration.py create mode 100644 tb_rest_client/models/models_ce/device_data.py create mode 100644 tb_rest_client/models/models_ce/device_info.py create mode 100644 tb_rest_client/models/models_ce/device_profile_alarm.py create mode 100644 tb_rest_client/models/models_ce/device_profile_configuration.py create mode 100644 tb_rest_client/models/models_ce/device_profile_data.py create mode 100644 tb_rest_client/models/models_ce/device_profile_info.py create mode 100644 tb_rest_client/models/models_ce/device_profile_provision_configuration.py create mode 100644 tb_rest_client/models/models_ce/device_profile_transport_configuration.py create mode 100644 tb_rest_client/models/models_ce/device_transport_configuration.py create mode 100644 tb_rest_client/models/models_ce/entity_count_query.py create mode 100644 tb_rest_client/models/models_ce/entity_data.py create mode 100644 tb_rest_client/models/models_ce/entity_data_page_link.py create mode 100644 tb_rest_client/models/models_ce/entity_data_query.py create mode 100644 tb_rest_client/models/models_ce/entity_data_sort_order.py create mode 100644 tb_rest_client/models/models_ce/entity_filter.py create mode 100644 tb_rest_client/models/models_ce/entity_info.py create mode 100644 tb_rest_client/models/models_ce/entity_key.py create mode 100644 tb_rest_client/models/models_ce/entity_view_info.py create mode 100644 tb_rest_client/models/models_ce/event_filter.py create mode 100644 tb_rest_client/models/models_ce/home_dashboard.py create mode 100644 tb_rest_client/models/models_ce/home_dashboard_info.py create mode 100644 tb_rest_client/models/models_ce/input_stream.py create mode 100644 tb_rest_client/models/models_ce/key_filter.py create mode 100644 tb_rest_client/models/models_ce/key_filter_predicate.py create mode 100644 tb_rest_client/models/models_ce/mapstring_ts_value.py create mode 100644 tb_rest_client/models/models_ce/o_auth2_basic_mapper_config.py create mode 100644 tb_rest_client/models/models_ce/o_auth2_client_registration_template.py create mode 100644 tb_rest_client/models/models_ce/o_auth2_client_registration_template_id.py create mode 100644 tb_rest_client/models/models_ce/o_auth2_custom_mapper_config.py create mode 100644 tb_rest_client/models/models_ce/o_auth2_domain_info.py create mode 100644 tb_rest_client/models/models_ce/o_auth2_info.py create mode 100644 tb_rest_client/models/models_ce/o_auth2_mapper_config.py create mode 100644 tb_rest_client/models/models_ce/o_auth2_mobile_info.py create mode 100644 tb_rest_client/models/models_ce/o_auth2_params_info.py create mode 100644 tb_rest_client/models/models_ce/o_auth2_registration_info.py create mode 100644 tb_rest_client/models/models_ce/object_node.py create mode 100644 tb_rest_client/models/models_ce/ota_package_ota_package_idchecksumchecksum_algorithm_body.py create mode 100644 tb_rest_client/models/models_ce/page_data_alarm_data.py create mode 100644 tb_rest_client/models/models_ce/page_data_alarm_info.py create mode 100644 tb_rest_client/models/models_ce/page_data_asset.py create mode 100644 tb_rest_client/models/models_ce/page_data_asset_info.py create mode 100644 tb_rest_client/models/models_ce/page_data_audit_log.py create mode 100644 tb_rest_client/models/models_ce/page_data_customer.py create mode 100644 tb_rest_client/models/models_ce/page_data_dashboard_info.py create mode 100644 tb_rest_client/models/models_ce/page_data_device.py create mode 100644 tb_rest_client/models/models_ce/page_data_device_info.py create mode 100644 tb_rest_client/models/models_ce/page_data_device_profile.py create mode 100644 tb_rest_client/models/models_ce/page_data_device_profile_info.py create mode 100644 tb_rest_client/models/models_ce/page_data_edge.py create mode 100644 tb_rest_client/models/models_ce/page_data_edge_event.py create mode 100644 tb_rest_client/models/models_ce/page_data_edge_info.py create mode 100644 tb_rest_client/models/models_ce/page_data_entity_data.py create mode 100644 tb_rest_client/models/models_ce/page_data_entity_info.py create mode 100644 tb_rest_client/models/models_ce/page_data_entity_view.py create mode 100644 tb_rest_client/models/models_ce/page_data_entity_view_info.py create mode 100644 tb_rest_client/models/models_ce/page_data_event.py create mode 100644 tb_rest_client/models/models_ce/page_data_ota_package_info.py create mode 100644 tb_rest_client/models/models_ce/page_data_rpc.py create mode 100644 tb_rest_client/models/models_ce/page_data_rule_chain.py create mode 100644 tb_rest_client/models/models_ce/page_data_tb_resource_info.py create mode 100644 tb_rest_client/models/models_ce/page_data_tenant.py create mode 100644 tb_rest_client/models/models_ce/page_data_tenant_info.py create mode 100644 tb_rest_client/models/models_ce/page_data_tenant_profile.py create mode 100644 tb_rest_client/models/models_ce/page_data_user.py create mode 100644 tb_rest_client/models/models_ce/page_data_widgets_bundle.py create mode 100644 tb_rest_client/models/models_ce/relation_entity_type_filter.py create mode 100644 tb_rest_client/models/models_ce/resource.py create mode 100644 tb_rest_client/models/models_ce/rpc.py create mode 100644 tb_rest_client/models/models_ce/rpc_id.py create mode 100644 tb_rest_client/models/models_ce/rule_chain_data.py create mode 100644 tb_rest_client/models/models_ce/save_ota_package_info_request.py create mode 100644 tb_rest_client/models/models_ce/server_security_config.py create mode 100644 tb_rest_client/models/models_ce/sign_up_request.py create mode 100644 tb_rest_client/models/models_ce/sms_provider_configuration.py create mode 100644 tb_rest_client/models/models_ce/tenant_info.py create mode 100644 tb_rest_client/models/models_ce/test_sms_request.py create mode 100644 tb_rest_client/models/models_ce/ts_value.py create mode 100644 tb_rest_client/models/models_ce/uri.py create mode 100644 tb_rest_client/models/models_ce/url.py create mode 100644 tb_rest_client/models/models_ce/url_stream_handler.py create mode 100644 tb_rest_client/models/models_ce/widget_type_details.py create mode 100644 tb_rest_client/models/models_ce/widget_type_info.py create mode 100644 tb_rest_client/models/models_pe/asset_id.py create mode 100644 tb_rest_client/models/models_pe/blob_entity_id.py create mode 100644 tb_rest_client/models/models_pe/client_registration_dto.py create mode 100644 tb_rest_client/models/models_pe/converter_id.py create mode 100644 tb_rest_client/models/models_pe/delete_tenant_request.py create mode 100644 tb_rest_client/models/models_pe/device_group_ota_package.py rename tb_rest_client/models/models_pe/{device-profile.py => device_profile.py} (95%) create mode 100644 tb_rest_client/models/models_pe/domain_info.py create mode 100644 tb_rest_client/models/models_pe/edge.py create mode 100644 tb_rest_client/models/models_pe/edge_event.py create mode 100644 tb_rest_client/models/models_pe/entity_data.py create mode 100644 tb_rest_client/models/models_pe/entity_group_id.py create mode 100644 tb_rest_client/models/models_pe/entity_id.py create mode 100644 tb_rest_client/models/models_pe/entity_view_id.py create mode 100644 tb_rest_client/models/models_pe/group_permission_id.py create mode 100644 tb_rest_client/models/models_pe/home_dashboard.py create mode 100644 tb_rest_client/models/models_pe/http_routing_key_body.py create mode 100644 tb_rest_client/models/models_pe/integration_id.py create mode 100644 tb_rest_client/models/models_pe/o_auth2_basic_mapper_config.py create mode 100644 tb_rest_client/models/models_pe/o_auth2_clients_domain_params.py create mode 100644 tb_rest_client/models/models_pe/o_auth2_clients_params.py create mode 100644 tb_rest_client/models/models_pe/page_data_entity_group_info.py create mode 100644 tb_rest_client/models/models_pe/page_data_scheduler_event_info.py create mode 100644 tb_rest_client/models/models_pe/relation_entity_type_filter.py create mode 100644 tb_rest_client/models/models_pe/role_id.py create mode 100644 tb_rest_client/models/models_pe/scheduler_event_id.py create mode 100644 tb_rest_client/models/models_pe/share_group_request.py create mode 100644 tb_rest_client/models/models_pe/solution_install_response.py create mode 100644 tb_rest_client/models/models_pe/user_id.py diff --git a/.gitignore b/.gitignore index 5e08464d..a510f195 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ .idea/**/usage.statistics.xml .idea/**/dictionaries .idea/**/shelf +.idea/ +s.py +watermeters.json # AWS User-specific .idea/**/aws.xml diff --git a/tb_rest_client/__init__.py b/tb_rest_client/__init__.py index c35f00a2..e69de29b 100644 --- a/tb_rest_client/__init__.py +++ b/tb_rest_client/__init__.py @@ -1,70 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# flake8: noqa -from __future__ import absolute_import - -# import ce apis into sdk package - -from tb_rest_client.api.api_ce.admin_controller_api import AdminControllerApi -from tb_rest_client.api.api_ce.alarm_controller_api import AlarmControllerApi -from tb_rest_client.api.api_ce.asset_controller_api import AssetControllerApi -from tb_rest_client.api.api_ce.audit_log_controller_api import AuditLogControllerApi -from tb_rest_client.api.api_ce.auth_controller_api import AuthControllerApi -from tb_rest_client.api.api_ce.component_descriptor_controller_api import ComponentDescriptorControllerApi -from tb_rest_client.api.api_ce.customer_controller_api import CustomerControllerApi -from tb_rest_client.api.api_ce.dashboard_controller_api import DashboardControllerApi -from tb_rest_client.api.api_ce.device_controller_api import DeviceControllerApi -from tb_rest_client.api.api_ce.entity_relation_controller_api import EntityRelationControllerApi -from tb_rest_client.api.api_ce.entity_view_controller_api import EntityViewControllerApi -from tb_rest_client.api.api_ce.event_controller_api import EventControllerApi -from tb_rest_client.api.api_ce.queue_controller_api import QueueControllerApi -from tb_rest_client.api.api_ce.rpc_controller_api import RpcControllerApi -from tb_rest_client.api.api_ce.rule_chain_controller_api import RuleChainControllerApi -from tb_rest_client.api.api_ce.telemetry_controller_api import TelemetryControllerApi -from tb_rest_client.api.api_ce.tenant_controller_api import TenantControllerApi -from tb_rest_client.api.api_ce.user_controller_api import UserControllerApi -from tb_rest_client.api.api_ce.widget_type_controller_api import WidgetTypeControllerApi -from tb_rest_client.api.api_ce.widgets_bundle_controller_api import WidgetsBundleControllerApi - -# import pe apis into sdk package - -from tb_rest_client.api.api_pe.report_controller_api import ReportControllerApi -from tb_rest_client.api.api_pe.role_controller_api import RoleControllerApi -from tb_rest_client.api.api_pe.rule_engine_controller_api import RuleEngineControllerApi -from tb_rest_client.api.api_pe.scheduler_event_controller_api import SchedulerEventControllerApi -from tb_rest_client.api.api_pe.self_registration_controller_api import SelfRegistrationControllerApi -from tb_rest_client.api.api_pe.sig_fox_integration_controller_api import SigFoxIntegrationControllerApi -from tb_rest_client.api.api_pe.sign_up_controller_api import SignUpControllerApi -from tb_rest_client.api.api_pe.t_mobile_iot_cdp_integration_controller_api import TMobileIotCdpIntegrationControllerApi -from tb_rest_client.api.api_pe.thing_park_integration_controller_api import ThingParkIntegrationControllerApi -from tb_rest_client.api.api_pe.trail_controller_api import TrailControllerApi -from tb_rest_client.api.api_pe.user_permissions_controller_api import UserPermissionsControllerApi -from tb_rest_client.api.api_pe.white_labeling_controller_api import WhiteLabelingControllerApi -from tb_rest_client.api.api_pe.blob_entity_controller_api import BlobEntityControllerApi -from tb_rest_client.api.api_pe.converter_controller_api import ConverterControllerApi -from tb_rest_client.api.api_pe.custom_menu_controller_api import CustomMenuControllerApi -from tb_rest_client.api.api_pe.custom_translation_controller_api import CustomTranslationControllerApi -from tb_rest_client.api.api_pe.entity_group_controller_api import EntityGroupControllerApi -from tb_rest_client.api.api_pe.group_permission_controller_api import GroupPermissionControllerApi -from tb_rest_client.api.api_pe.http_integration_controller_api import HttpIntegrationControllerApi -from tb_rest_client.api.api_pe.integration_controller_api import IntegrationControllerApi -from tb_rest_client.api.api_pe.ocean_connect_integration_controller_api import OceanConnectIntegrationControllerApi -from tb_rest_client.api.api_pe.owner_controller_api import OwnerControllerApi - -# import ApiClient -from tb_rest_client.api_client import ApiClient -from tb_rest_client.configuration import Configuration diff --git a/tb_rest_client/api/__init__.py b/tb_rest_client/api/__init__.py index 2af4123f..e69de29b 100644 --- a/tb_rest_client/api/__init__.py +++ b/tb_rest_client/api/__init__.py @@ -1,15 +0,0 @@ -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - diff --git a/tb_rest_client/api/api_ce/__init__.py b/tb_rest_client/api/api_ce/__init__.py index c6d3a07d..dd8df876 100644 --- a/tb_rest_client/api/api_ce/__init__.py +++ b/tb_rest_client/api/api_ce/__init__.py @@ -1,49 +1,46 @@ -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api_pe package -from .admin_controller_api import AdminControllerApi -from .alarm_controller_api import AlarmControllerApi +from .o_auth_2_config_template_controller_api import OAuth2ConfigTemplateControllerApi from .asset_controller_api import AssetControllerApi -from .audit_log_controller_api import AuditLogControllerApi +from .asset_controller_api import AssetControllerApi +from .rule_chain_controller_api import RuleChainControllerApi from .auth_controller_api import AuthControllerApi -from .component_descriptor_controller_api import ComponentDescriptorControllerApi -from .customer_controller_api import CustomerControllerApi -from .dashboard_controller_api import DashboardControllerApi -from .device_api_controller_api import DeviceApiControllerApi -from .device_profile_controller_api import DeviceProfileControllerApi +from .event_controller_api import EventControllerApi +from .telemetry_controller_api import TelemetryControllerApi +from .alarm_controller_api import AlarmControllerApi +from .edge_controller_api import EdgeControllerApi from .edge_controller_api import EdgeControllerApi +from .rpc_v_2_controller_api import RpcV2ControllerApi +from .rpc_v_2_controller_api import RpcV2ControllerApi +from .edge_event_controller_api import EdgeEventControllerApi from .edge_event_controller_api import EdgeEventControllerApi -from .entity_query_controller import EntityQueryControllerApi +from .customer_controller_api import CustomerControllerApi +from .customer_controller_api import CustomerControllerApi +from .user_controller_api import UserControllerApi +from .user_controller_api import UserControllerApi +from .queue_controller_api import QueueControllerApi +from .rpc_v_1_controller_api import RpcV1ControllerApi +from .device_controller_api import DeviceControllerApi from .device_controller_api import DeviceControllerApi from .entity_relation_controller_api import EntityRelationControllerApi from .entity_view_controller_api import EntityViewControllerApi -from .event_controller_api import EventControllerApi -from .lwm_2m_controller_api import Lwm2mControllerApi -from .ota_package_controller_api import OtaPackageControllerApi +from .entity_view_controller_api import EntityViewControllerApi +from .admin_controller_api import AdminControllerApi +from .admin_controller_api import AdminControllerApi +from .sign_up_controller_api import SignUpControllerApi +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 -from .queue_controller_api import QueueControllerApi -from .rpc_controller_api import RpcControllerApi -from .rule_chain_controller_api import RuleChainControllerApi -from .telemetry_controller_api import TelemetryControllerApi -from .tenant_controller_api import TenantControllerApi -from .user_controller_api import UserControllerApi -from .widget_type_controller_api import WidgetTypeControllerApi from .widgets_bundle_controller_api import WidgetsBundleControllerApi +from .device_profile_controller_api import DeviceProfileControllerApi +from .dashboard_controller_api import DashboardControllerApi +from .dashboard_controller_api import DashboardControllerApi +from .entity_query_controller_api import EntityQueryControllerApi +from .widget_type_controller_api import WidgetTypeControllerApi +from .audit_log_controller_api import AuditLogControllerApi +from .lwm_2m_controller_api import Lwm2mControllerApi +from .lwm_2m_controller_api import Lwm2mControllerApi +from .component_descriptor_controller_api import ComponentDescriptorControllerApi +from .tenant_controller_api import TenantControllerApi +from .tenant_controller_api import TenantControllerApi +from .ota_package_controller_api import OtaPackageControllerApi +from .ota_package_controller_api import OtaPackageControllerApi 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 2170ce2d..91ee367a 100644 --- a/tb_rest_client/api/api_ce/admin_controller_api.py +++ b/tb_rest_client/api/api_ce/admin_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class AdminControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def check_updates_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.check_updates_using_get(async_req=True) + >>> thread = api.check_updates_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -59,7 +57,7 @@ def check_updates_using_get_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.check_updates_using_get_with_http_info(async_req=True) + >>> thread = api.check_updates_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -76,7 +74,11 @@ def check_updates_using_get_with_http_info(self, **kwargs): # noqa: E501 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_updates_using_get" % key + ) params[key] = val del params['kwargs'] @@ -96,10 +98,6 @@ def check_updates_using_get_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -124,7 +122,7 @@ def get_admin_settings_using_get(self, key, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_admin_settings_using_get(key, async_req=True) + >>> thread = api.get_admin_settings_using_get(key, async_req=True) >>> result = thread.get() :param async_req bool @@ -145,7 +143,7 @@ def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_admin_settings_using_get_with_http_info(key, async_req=True) + >>> thread = api.get_admin_settings_using_get_with_http_info(key, async_req=True) >>> result = thread.get() :param async_req bool @@ -163,7 +161,11 @@ def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E 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_admin_settings_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'key' is set @@ -189,10 +191,6 @@ def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -217,7 +215,7 @@ def get_security_settings_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_security_settings_using_get(async_req=True) + >>> thread = api.get_security_settings_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -237,7 +235,7 @@ def get_security_settings_using_get_with_http_info(self, **kwargs): # noqa: E50 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_security_settings_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 @@ -254,7 +252,11 @@ def get_security_settings_using_get_with_http_info(self, **kwargs): # noqa: E50 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_security_settings_using_get" % key + ) params[key] = val del params['kwargs'] @@ -274,10 +276,6 @@ def get_security_settings_using_get_with_http_info(self, **kwargs): # noqa: E50 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -297,43 +295,43 @@ 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, admin_settings, **kwargs): # noqa: E501 + def save_admin_settings_using_post(self, body, **kwargs): # noqa: E501 """saveAdminSettings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_admin_settings_using_post(admin_settings, async_req=True) + >>> thread = api.save_admin_settings_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param AdminSettings admin_settings: adminSettings (required) + :param AdminSettings body: adminSettings (required) :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(admin_settings, **kwargs) # noqa: E501 + return self.save_admin_settings_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_admin_settings_using_post_with_http_info(admin_settings, **kwargs) # noqa: E501 + (data) = self.save_admin_settings_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_admin_settings_using_post_with_http_info(self, admin_settings, **kwargs): # noqa: E501 + def save_admin_settings_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveAdminSettings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_admin_settings_using_post_with_http_info(admin_settings, async_req=True) + >>> thread = api.save_admin_settings_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param AdminSettings admin_settings: adminSettings (required) + :param AdminSettings body: adminSettings (required) :return: AdminSettings If the method is called asynchronously, returns the request thread. """ - all_params = ['admin_settings'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -341,13 +339,17 @@ def save_admin_settings_using_post_with_http_info(self, admin_settings, **kwargs 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_admin_settings_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'admin_settings' is set - if ('admin_settings' not in params or - params['admin_settings'] is None): - raise ValueError("Missing the required parameter `admin_settings` when calling `save_admin_settings_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_admin_settings_using_post`") # noqa: E501 collection_formats = {} @@ -361,8 +363,8 @@ def save_admin_settings_using_post_with_http_info(self, admin_settings, **kwargs local_var_files = {} body_params = None - if 'admin_settings' in params: - body_params = params['admin_settings'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -390,43 +392,43 @@ def save_admin_settings_using_post_with_http_info(self, admin_settings, **kwargs _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_security_settings_using_post(self, security_settings, **kwargs): # noqa: E501 + def save_security_settings_using_post(self, body, **kwargs): # noqa: E501 """saveSecuritySettings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_security_settings_using_post(security_settings, async_req=True) + >>> thread = api.save_security_settings_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param SecuritySettings security_settings: securitySettings (required) + :param SecuritySettings body: securitySettings (required) :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_security_settings_using_post_with_http_info(security_settings, **kwargs) # noqa: E501 + return self.save_security_settings_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_security_settings_using_post_with_http_info(security_settings, **kwargs) # noqa: E501 + (data) = self.save_security_settings_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_security_settings_using_post_with_http_info(self, security_settings, **kwargs): # noqa: E501 + def save_security_settings_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveSecuritySettings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_security_settings_using_post_with_http_info(security_settings, async_req=True) + >>> thread = api.save_security_settings_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param SecuritySettings security_settings: securitySettings (required) + :param SecuritySettings body: securitySettings (required) :return: SecuritySettings If the method is called asynchronously, returns the request thread. """ - all_params = ['security_settings'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -434,13 +436,17 @@ def save_security_settings_using_post_with_http_info(self, security_settings, ** 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_security_settings_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'security_settings' is set - if ('security_settings' not in params or - params['security_settings'] is None): - raise ValueError("Missing the required parameter `security_settings` when calling `save_security_settings_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_security_settings_using_post`") # noqa: E501 collection_formats = {} @@ -454,8 +460,8 @@ def save_security_settings_using_post_with_http_info(self, security_settings, ** local_var_files = {} body_params = None - if 'security_settings' in params: - body_params = params['security_settings'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -483,43 +489,43 @@ def save_security_settings_using_post_with_http_info(self, security_settings, ** _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def send_test_mail_using_post(self, admin_settings, **kwargs): # noqa: E501 + def send_test_mail_using_post(self, body, **kwargs): # noqa: E501 """sendTestMail # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.send_test_mail_using_post(admin_settings, async_req=True) + >>> thread = api.send_test_mail_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param AdminSettings admin_settings: adminSettings (required) + :param AdminSettings body: adminSettings (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.send_test_mail_using_post_with_http_info(admin_settings, **kwargs) # noqa: E501 + return self.send_test_mail_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.send_test_mail_using_post_with_http_info(admin_settings, **kwargs) # noqa: E501 + (data) = self.send_test_mail_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def send_test_mail_using_post_with_http_info(self, admin_settings, **kwargs): # noqa: E501 + def send_test_mail_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """sendTestMail # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.send_test_mail_using_post_with_http_info(admin_settings, async_req=True) + >>> thread = api.send_test_mail_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param AdminSettings admin_settings: adminSettings (required) + :param AdminSettings body: adminSettings (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['admin_settings'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -527,13 +533,17 @@ def send_test_mail_using_post_with_http_info(self, admin_settings, **kwargs): # 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 send_test_mail_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'admin_settings' is set - if ('admin_settings' not in params or - params['admin_settings'] is None): - raise ValueError("Missing the required parameter `admin_settings` when calling `send_test_mail_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `send_test_mail_using_post`") # noqa: E501 collection_formats = {} @@ -547,12 +557,8 @@ def send_test_mail_using_post_with_http_info(self, admin_settings, **kwargs): # local_var_files = {} body_params = None - if 'admin_settings' in params: - body_params = params['admin_settings'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -575,3 +581,96 @@ def send_test_mail_using_post_with_http_info(self, admin_settings, **kwargs): # _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def send_test_sms_using_post(self, body, **kwargs): # noqa: E501 + """sendTestSms # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_test_sms_using_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TestSmsRequest body: testSmsRequest (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.send_test_sms_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.send_test_sms_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def send_test_sms_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """sendTestSms # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_test_sms_using_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TestSmsRequest body: testSmsRequest (required) + :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 send_test_sms_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `send_test_sms_using_post`") # noqa: E501 + + 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 `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/testSms', '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_ce/alarm_controller_api.py b/tb_rest_client/api/api_ce/alarm_controller_api.py index e02e81a6..c6f08333 100644 --- a/tb_rest_client/api/api_ce/alarm_controller_api.py +++ b/tb_rest_client/api/api_ce/alarm_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class AlarmControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def ack_alarm_using_post(self, alarm_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.ack_alarm_using_post(alarm_id, async_req=True) + >>> thread = api.ack_alarm_using_post(alarm_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +58,7 @@ def ack_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.ack_alarm_using_post_with_http_info(alarm_id, async_req=True) + >>> thread = api.ack_alarm_using_post_with_http_info(alarm_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,13 +76,17 @@ def ack_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E501 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 ack_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 `ack_alarm_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `ack_alarm_using_post`") # noqa: E501 collection_formats = {} @@ -100,14 +102,6 @@ def ack_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E501 local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -132,7 +126,7 @@ def clear_alarm_using_post(self, alarm_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.clear_alarm_using_post(alarm_id, async_req=True) + >>> thread = api.clear_alarm_using_post(alarm_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -153,7 +147,7 @@ def clear_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E5 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.clear_alarm_using_post_with_http_info(alarm_id, async_req=True) + >>> thread = api.clear_alarm_using_post_with_http_info(alarm_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -171,13 +165,17 @@ def clear_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E5 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_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 `clear_alarm_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `clear_alarm_using_post`") # noqa: E501 collection_formats = {} @@ -193,14 +191,6 @@ def clear_alarm_using_post_with_http_info(self, alarm_id, **kwargs): # noqa: E5 local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -225,7 +215,7 @@ def delete_alarm_using_delete(self, alarm_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_alarm_using_delete(alarm_id, async_req=True) + >>> thread = api.delete_alarm_using_delete(alarm_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -246,7 +236,7 @@ def delete_alarm_using_delete_with_http_info(self, alarm_id, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_alarm_using_delete_with_http_info(alarm_id, async_req=True) + >>> thread = api.delete_alarm_using_delete_with_http_info(alarm_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -264,13 +254,17 @@ def delete_alarm_using_delete_with_http_info(self, alarm_id, **kwargs): # noqa: 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_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_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `alarm_id` when calling `delete_alarm_using_delete`") # noqa: E501 collection_formats = {} @@ -290,10 +284,6 @@ def delete_alarm_using_delete_with_http_info(self, alarm_id, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -318,7 +308,7 @@ def get_alarm_by_id_using_get(self, alarm_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_alarm_by_id_using_get(alarm_id, async_req=True) + >>> thread = api.get_alarm_by_id_using_get(alarm_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -339,7 +329,7 @@ def get_alarm_by_id_using_get_with_http_info(self, alarm_id, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_alarm_by_id_using_get_with_http_info(alarm_id, async_req=True) + >>> thread = api.get_alarm_by_id_using_get_with_http_info(alarm_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -357,13 +347,17 @@ def get_alarm_by_id_using_get_with_http_info(self, alarm_id, **kwargs): # noqa: 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_by_id_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_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 = {} @@ -383,10 +377,6 @@ def get_alarm_by_id_using_get_with_http_info(self, alarm_id, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -411,7 +401,7 @@ def get_alarm_info_by_id_using_get(self, alarm_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_alarm_info_by_id_using_get(alarm_id, async_req=True) + >>> thread = api.get_alarm_info_by_id_using_get(alarm_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -432,7 +422,7 @@ def get_alarm_info_by_id_using_get_with_http_info(self, alarm_id, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_alarm_info_by_id_using_get_with_http_info(alarm_id, async_req=True) + >>> thread = api.get_alarm_info_by_id_using_get_with_http_info(alarm_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -450,13 +440,17 @@ def get_alarm_info_by_id_using_get_with_http_info(self, alarm_id, **kwargs): # 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_info_by_id_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_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 = {} @@ -476,10 +470,6 @@ def get_alarm_info_by_id_using_get_with_http_info(self, alarm_id, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -504,35 +494,31 @@ def get_alarms_using_get(self, entity_type, entity_id, page_size, page, **kwargs This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_alarms_using_get(entity_type, entity_id, page_size, page, async_req=True) + >>> thread = api.get_alarms_using_get(entity_type, entity_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str entity_type: entityType (required) :param str entity_id: entityId (required) + :param int page_size: pageSize (required) + :param int page: page (required) :param str search_status: searchStatus :param str status: status - :param str page_size: pageSize (required) - :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder :param int start_time: startTime :param int end_time: endTime - :param bool asc_order: ascOrder - :param str offset: offset :param bool fetch_originator: fetchOriginator - :return: TimePageDataAlarmInfo + :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_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 @@ -540,32 +526,28 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_alarms_using_get_with_http_info(entity_type, entity_id, page_size, page, async_req=True) + >>> thread = api.get_alarms_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: entityType (required) :param str entity_id: entityId (required) + :param int page_size: pageSize (required) + :param int page: page (required) :param str search_status: searchStatus :param str status: status - :param str page_size: pageSize (required) - :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder :param int start_time: startTime :param int end_time: endTime - :param bool asc_order: ascOrder - :param str offset: offset :param bool fetch_originator: fetchOriginator - :return: TimePageDataAlarmInfo + :return: PageDataAlarmInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'search_status', 'status', 'page_size', 'page', 'text_search', - 'sort_property', 'sort_order', 'start_time', 'end_time', 'asc_order', 'offset', - 'fetch_originator'] # noqa: E501 + 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.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -573,22 +555,25 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, 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_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_using_get`") # noqa: E501 + 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 # 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): @@ -621,10 +606,6 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, query_params.append(('startTime', params['start_time'])) # noqa: E501 if 'end_time' in params: query_params.append(('endTime', params['end_time'])) # noqa: E501 - if 'asc_order' in params: - query_params.append(('ascOrder', params['asc_order'])) # noqa: E501 - if 'offset' in params: - query_params.append(('offset', params['offset'])) # noqa: E501 if 'fetch_originator' in params: query_params.append(('fetchOriginator', params['fetch_originator'])) # noqa: E501 @@ -638,23 +619,18 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/{entityType}/{entityId}{?searchStatus,status,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime,offset,fetchOriginator}', - 'GET', + '/api/alarm/{entityType}/{entityId}{?searchStatus,status,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime,fetchOriginator}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TimePageDataAlarmInfo', # noqa: E501 + 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'), @@ -662,30 +638,29 @@ def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_all_alarms_using_get(self, page_size, page, **kwargs): + def get_all_alarms_using_get(self, page_size, page, **kwargs): # noqa: E501 """getAllAlarms # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_all_alarms_using_get(page_size, page, async_req=True) + >>> thread = api.get_all_alarms_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param int page_size: pageSize (required) + :param int page: page (required) :param str search_status: searchStatus :param str status: status - :param str page_size: pageSize (required) - :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder :param int start_time: startTime :param int end_time: endTime :param bool fetch_originator: fetchOriginator - :return: TimePageDataAlarmInfo + :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_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 @@ -693,32 +668,31 @@ def get_all_alarms_using_get(self, page_size, page, **kwargs): (data) = self.get_all_alarms_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): + def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 """getAllAlarms # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_all_alarms_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_all_alarms_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param int page_size: pageSize (required) + :param int page: page (required) :param str search_status: searchStatus :param str status: status - :param str page_size: pageSize (required) - :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder :param int start_time: startTime :param int end_time: endTime :param bool fetch_originator: fetchOriginator - :return: TimePageDataAlarmInfo + :return: PageDataAlarmInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['search_status', 'status', 'page_size', 'page', 'text_search', - 'sort_property', 'sort_order', 'start_time', 'end_time', 'fetch_originator'] # noqa: E501 + all_params = ['page_size', 'page', 'search_status', 'status', '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') @@ -726,18 +700,21 @@ def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): 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_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_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_alarms_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_all_alarms_using_get`") # noqa: E501 collection_formats = {} @@ -775,23 +752,18 @@ def get_all_alarms_using_get_with_http_info(self, page_size, page, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/alarms{?searchStatus,status,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime,fetchOriginator}', - 'GET', + '/api/alarms{?searchStatus,status,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime,fetchOriginator}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TimePageDataAlarmInfo', # noqa: E501 + 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'), @@ -804,7 +776,7 @@ def get_highest_alarm_severity_using_get(self, entity_type, entity_id, **kwargs) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_highest_alarm_severity_using_get(entity_type, entity_id, async_req=True) + >>> thread = api.get_highest_alarm_severity_using_get(entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -818,11 +790,9 @@ def get_highest_alarm_severity_using_get(self, entity_type, entity_id, **kwargs) """ 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 @@ -830,7 +800,7 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_highest_alarm_severity_using_get_with_http_info(entity_type, entity_id, async_req=True) + >>> thread = api.get_highest_alarm_severity_using_get_with_http_info(entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -851,18 +821,21 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit 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_highest_alarm_severity_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_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 = {} @@ -888,10 +861,6 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -911,43 +880,43 @@ def get_highest_alarm_severity_using_get_with_http_info(self, entity_type, entit _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_alarm_using_post(self, alarm, **kwargs): # noqa: E501 + def save_alarm_using_post(self, body, **kwargs): # noqa: E501 """saveAlarm # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_alarm_using_post(alarm, async_req=True) + >>> thread = api.save_alarm_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Alarm alarm: alarm (required) + :param Alarm body: alarm (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.save_alarm_using_post_with_http_info(alarm, **kwargs) # noqa: E501 + return self.save_alarm_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_alarm_using_post_with_http_info(alarm, **kwargs) # noqa: E501 + (data) = self.save_alarm_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_alarm_using_post_with_http_info(self, alarm, **kwargs): # noqa: E501 + def save_alarm_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveAlarm # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_alarm_using_post_with_http_info(alarm, async_req=True) + >>> thread = api.save_alarm_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Alarm alarm: alarm (required) + :param Alarm body: alarm (required) :return: Alarm If the method is called asynchronously, returns the request thread. """ - all_params = ['alarm'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -955,13 +924,17 @@ def save_alarm_using_post_with_http_info(self, alarm, **kwargs): # noqa: E501 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_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'alarm' is set - if ('alarm' not in params or - params['alarm'] is None): - raise ValueError( - "Missing the required parameter `alarm` when calling `save_alarm_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_alarm_using_post`") # noqa: E501 collection_formats = {} @@ -975,8 +948,8 @@ def save_alarm_using_post_with_http_info(self, alarm, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'alarm' in params: - body_params = params['alarm'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 544e73e3..142ed974 100644 --- a/tb_rest_client/api/api_ce/asset_controller_api.py +++ b/tb_rest_client/api/api_ce/asset_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class AssetControllerApi(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 """ @@ -39,7 +37,7 @@ def assign_asset_to_customer_using_post(self, customer_id, asset_id, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_asset_to_customer_using_post(customer_id, asset_id, async_req=True) + >>> thread = api.assign_asset_to_customer_using_post(customer_id, asset_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -51,11 +49,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 @@ -63,7 +59,7 @@ def assign_asset_to_customer_using_post_with_http_info(self, customer_id, asset_ This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_asset_to_customer_using_post_with_http_info(customer_id, asset_id, async_req=True) + >>> thread = api.assign_asset_to_customer_using_post_with_http_info(customer_id, asset_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -82,18 +78,21 @@ def assign_asset_to_customer_using_post_with_http_info(self, customer_id, asset_ 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_asset_to_customer_using_post" % 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 `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 = {} @@ -115,10 +114,6 @@ def assign_asset_to_customer_using_post_with_http_info(self, customer_id, asset_ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -138,12 +133,113 @@ def assign_asset_to_customer_using_post_with_http_info(self, customer_id, asset_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def assign_asset_to_edge_using_post(self, edge_id, asset_id, **kwargs): # noqa: E501 + """assignAssetToEdge # 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_asset_to_edge_using_post(edge_id, asset_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str asset_id: assetId (required) + :return: Asset + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.assign_asset_to_edge_using_post_with_http_info(edge_id, asset_id, **kwargs) # noqa: E501 + else: + (data) = self.assign_asset_to_edge_using_post_with_http_info(edge_id, asset_id, **kwargs) # noqa: E501 + return data + + def assign_asset_to_edge_using_post_with_http_info(self, edge_id, asset_id, **kwargs): # noqa: E501 + """assignAssetToEdge # 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_asset_to_edge_using_post_with_http_info(edge_id, asset_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str asset_id: assetId (required) + :return: Asset + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_id', '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 assign_asset_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 `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 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + 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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/{edgeId}/asset/{assetId}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Asset', # 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_asset_to_public_customer_using_post(self, asset_id, **kwargs): # noqa: E501 """assignAssetToPublicCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_asset_to_public_customer_using_post(asset_id, async_req=True) + >>> thread = api.assign_asset_to_public_customer_using_post(asset_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -164,7 +260,7 @@ def assign_asset_to_public_customer_using_post_with_http_info(self, asset_id, ** This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_asset_to_public_customer_using_post_with_http_info(asset_id, async_req=True) + >>> thread = api.assign_asset_to_public_customer_using_post_with_http_info(asset_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -182,13 +278,17 @@ def assign_asset_to_public_customer_using_post_with_http_info(self, asset_id, ** 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_asset_to_public_customer_using_post" % 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 `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 = {} @@ -208,10 +308,6 @@ def assign_asset_to_public_customer_using_post_with_http_info(self, asset_id, ** header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -236,7 +332,7 @@ def delete_asset_using_delete(self, asset_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_asset_using_delete(asset_id, async_req=True) + >>> thread = api.delete_asset_using_delete(asset_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -257,7 +353,7 @@ def delete_asset_using_delete_with_http_info(self, asset_id, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_asset_using_delete_with_http_info(asset_id, async_req=True) + >>> thread = api.delete_asset_using_delete_with_http_info(asset_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -275,13 +371,17 @@ def delete_asset_using_delete_with_http_info(self, asset_id, **kwargs): # noqa: 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_using_delete" % 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 `delete_asset_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `asset_id` when calling `delete_asset_using_delete`") # noqa: E501 collection_formats = {} @@ -297,14 +397,6 @@ def delete_asset_using_delete_with_http_info(self, asset_id, **kwargs): # noqa: local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -324,43 +416,43 @@ def delete_asset_using_delete_with_http_info(self, asset_id, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def find_by_query_using_post(self, query, **kwargs): # noqa: E501 + def find_by_query_using_post(self, body, **kwargs): # noqa: E501 """findByQuery # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_query_using_post(query, async_req=True) + >>> thread = api.find_by_query_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param AssetSearchQuery query: query (required) + :param AssetSearchQuery body: query (required) :return: list[Asset] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.find_by_query_using_post_with_http_info(query, **kwargs) # noqa: E501 + return self.find_by_query_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.find_by_query_using_post_with_http_info(query, **kwargs) # noqa: E501 + (data) = self.find_by_query_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def find_by_query_using_post_with_http_info(self, query, **kwargs): # noqa: E501 + def find_by_query_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """findByQuery # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_query_using_post_with_http_info(query, async_req=True) + >>> thread = api.find_by_query_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param AssetSearchQuery query: query (required) + :param AssetSearchQuery body: query (required) :return: list[Asset] If the method is called asynchronously, returns the request thread. """ - all_params = ['query'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -368,13 +460,17 @@ def find_by_query_using_post_with_http_info(self, query, **kwargs): # noqa: E50 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_by_query_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'query' is set - if ('query' not in params or - params['query'] is None): - raise ValueError( - "Missing the required parameter `query` when calling `find_by_query_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_by_query_using_post`") # noqa: E501 collection_formats = {} @@ -388,8 +484,8 @@ def find_by_query_using_post_with_http_info(self, query, **kwargs): # noqa: E50 local_var_files = {} body_params = None - if 'query' in params: - body_params = params['query'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -422,7 +518,7 @@ def get_asset_by_id_using_get(self, asset_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_asset_by_id_using_get(asset_id, async_req=True) + >>> thread = api.get_asset_by_id_using_get(asset_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -443,7 +539,7 @@ def get_asset_by_id_using_get_with_http_info(self, asset_id, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_asset_by_id_using_get_with_http_info(asset_id, async_req=True) + >>> thread = api.get_asset_by_id_using_get_with_http_info(asset_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -461,13 +557,17 @@ def get_asset_by_id_using_get_with_http_info(self, asset_id, **kwargs): # noqa: 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_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_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 = {} @@ -487,10 +587,6 @@ def get_asset_by_id_using_get_with_http_info(self, asset_id, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -510,12 +606,105 @@ 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 + """getAssetInfoById # noqa: 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: assetId (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 + """getAssetInfoById # noqa: 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: assetId (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( + ['*/*']) # 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 """getAssetTypes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_asset_types_using_get(async_req=True) + >>> thread = api.get_asset_types_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -535,7 +724,7 @@ def get_asset_types_using_get_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_asset_types_using_get_with_http_info(async_req=True) + >>> thread = api.get_asset_types_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -552,6 +741,11 @@ def get_asset_types_using_get_with_http_info(self, **kwargs): # noqa: E501 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_types_using_get" % key + ) params[key] = val del params['kwargs'] @@ -571,10 +765,6 @@ def get_asset_types_using_get_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -599,7 +789,7 @@ def get_assets_by_ids_using_get(self, asset_ids, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_assets_by_ids_using_get(asset_ids, async_req=True) + >>> thread = api.get_assets_by_ids_using_get(asset_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -620,7 +810,7 @@ def get_assets_by_ids_using_get_with_http_info(self, asset_ids, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_assets_by_ids_using_get_with_http_info(asset_ids, async_req=True) + >>> thread = api.get_assets_by_ids_using_get_with_http_info(asset_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -638,13 +828,17 @@ def get_assets_by_ids_using_get_with_http_info(self, asset_ids, **kwargs): # no 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_assets_by_ids_using_get" % key + ) params[key] = val del params['kwargs'] # 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 = {} @@ -664,10 +858,6 @@ def get_assets_by_ids_using_get_with_http_info(self, asset_ids, **kwargs): # no header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -687,58 +877,55 @@ 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_assets_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 - """getCustomerAssets # noqa: E501 + def get_customer_asset_infos_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerAssetInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_assets_using_get(customer_id, page_size, page, 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: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataAsset + :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_assets_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_assets_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_assets_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 - """getCustomerAssets # noqa: E501 + def get_customer_asset_infos_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerAssetInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_assets_using_get_with_http_info(customer_id, page_size, page, 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: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataAsset + :return: PageDataAssetInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['customer_id', 'type', 'text_search', 'sort_property', 'sort_order', 'page_size', - 'page'] # 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') @@ -746,23 +933,25 @@ def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, p 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_assets_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_assets_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_assets_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_customer_asset_infos_using_get`") # noqa: E501 collection_formats = {} @@ -794,22 +983,18 @@ def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, p header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/customer/{customerId}/assets{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/customer/{customerId}/assetInfos{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataAsset', # noqa: E501 + 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'), @@ -817,47 +1002,55 @@ def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, p _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def unassign_asset_from_edge_using_delete(self, edge_id, asset_id, **kwargs): - """unassignAssetFromEdge # noqa: E501 + def get_customer_assets_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerAssets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_asset_from_edge_using_delete(edge_id, asset_id, async_req=True) + >>> thread = api.get_customer_assets_using_get(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str asset_id: assetId (required) - :return: None + :param str customer_id: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataAsset If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.unassign_asset_from_edge_using_delete_with_http_info(edge_id, asset_id, **kwargs) # noqa: E501 + return self.get_customer_assets_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.unassign_asset_from_edge_using_delete_with_http_info(edge_id, asset_id, - **kwargs) # noqa: E501 + (data) = self.get_customer_assets_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 return data - def unassign_asset_from_edge_using_delete_with_http_info(self, edge_id, asset_id, **kwargs): - """unassignAssetFromEdge # noqa: E501 + def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerAssets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_asset_from_edge_using_delete_with_http_info(edge_id, asset_id, async_req=True) + >>> thread = api.get_customer_assets_using_get_with_http_info(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str asset_id: assetId (required) - :return: None + :param str customer_id: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataAsset If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'asset_id'] # 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') @@ -865,133 +1058,45 @@ def unassign_asset_from_edge_using_delete_with_http_info(self, edge_id, asset_id 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_assets_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_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 `delete_asset_using_delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 - 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( - ['*/*']) # 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/{edgeId}/asset/{assetId}', '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 assign_asset_to_edge_using_post(self, edge_id, asset_id, **kwargs): - """assignAssetToEdge # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_asset_to_edge_using_post(edge_id, asset_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str edge_id: edgeId (required) - :param str asset_id: assetId (required) - :return: Asset - If the method is called asynchronously, - returns the request thread. - """ - - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.assign_asset_to_edge_using_post_with_http_info(edge_id, asset_id, **kwargs) # noqa: E501 - else: - (data) = self.assign_asset_to_edge_using_post_with_http_info(edge_id, asset_id, **kwargs) # noqa: E501 - return data - - def assign_asset_to_edge_using_post_with_http_info(self, edge_id, asset_id, **kwargs): - """assignAssetToEdge # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_asset_to_edge_using_post_with_http_info(edge_id, asset_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str edge_id: edgeId (required) - :param str asset_id: assetId (required) - :return: Asset - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['edge_id', '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']): - 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_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 `delete_asset_using_delete`") # noqa: E501 + # 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 + # 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 + # 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 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 - if 'asset_id' in params: - path_params['assetId'] = params['asset_id'] # noqa: E501 + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 query_params = [] + 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 + 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 = {} @@ -1003,22 +1108,18 @@ def assign_asset_to_edge_using_post_with_http_info(self, edge_id, asset_id, **kw header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/{edgeId}/asset/{assetId}', 'POST', + '/api/customer/{customerId}/assets{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Asset', # noqa: E501 + response_type='PageDataAsset', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1026,29 +1127,28 @@ def assign_asset_to_edge_using_post_with_http_info(self, edge_id, asset_id, **kw _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_edge_assets_using_get(self, edge_id, page_size, page, **kwargs): + def get_edge_assets_using_get(self, edge_id, page_size, page, **kwargs): # noqa: E501 """getEdgeAssets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_edge_assets_using_get(edge_id, page_size, page, async_req=True) + >>> thread = api.get_edge_assets_using_get(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str start_time: startTime - :param str end_time: endTime - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataAsset + :param int start_time: startTime + :param int end_time: endTime + :return: PageDataAsset 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_assets_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 @@ -1056,31 +1156,30 @@ def get_edge_assets_using_get(self, edge_id, page_size, page, **kwargs): (data) = self.get_edge_assets_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 return data - def get_edge_assets_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): + def get_edge_assets_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): # noqa: E501 """getEdgeAssets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_edge_assets_using_get_with_http_info(edge_id, page_size, page, async_req=True) + >>> thread = api.get_edge_assets_using_get_with_http_info(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str start_time: startTime - :param str end_time: endTime - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataAsset + :param int start_time: startTime + :param int end_time: endTime + :return: PageDataAsset If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'type', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', - 'page_size', 'page'] # 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') @@ -1088,24 +1187,25 @@ def get_edge_assets_using_get_with_http_info(self, edge_id, page_size, page, **k 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_assets_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_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 = {} @@ -1114,7 +1214,6 @@ def get_edge_assets_using_get_with_http_info(self, edge_id, page_size, page, **k path_params['edgeId'] = params['edge_id'] # noqa: E501 query_params = [] - if 'type' in params: query_params.append(('type', params['type'])) # noqa: E501 if 'text_search' in params: @@ -1142,10 +1241,6 @@ def get_edge_assets_using_get_with_http_info(self, edge_id, page_size, page, **k header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1157,7 +1252,7 @@ def get_edge_assets_using_get_with_http_info(self, edge_id, page_size, page, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataAsset', # noqa: E501 + response_type='PageDataAsset', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1165,26 +1260,25 @@ def get_edge_assets_using_get_with_http_info(self, edge_id, page_size, page, **k _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_asset_infos_using_get(self, page_size, page, **kwargs): + def get_tenant_asset_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 """getTenantAssetInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_asset_infos_using_get(page_size, page, async_req=True) + >>> thread = api.get_tenant_asset_infos_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataAsset + :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_tenant_asset_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 @@ -1192,27 +1286,27 @@ def get_tenant_asset_infos_using_get(self, page_size, page, **kwargs): (data) = self.get_tenant_asset_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def get_tenant_asset_infos_using_get_with_http_info(self, page_size, page, **kwargs): + def get_tenant_asset_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 """getTenantAssetInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_asset_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_tenant_asset_infos_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataAsset + :return: PageDataAssetInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['type', 'text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501 + all_params = ['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') @@ -1220,26 +1314,27 @@ def get_tenant_asset_infos_using_get_with_http_info(self, page_size, page, **kwa 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_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_edge_assets_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_edge_assets_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_tenant_asset_infos_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'type' in params: query_params.append(('type', params['type'])) # noqa: E501 if 'text_search' in params: @@ -1263,10 +1358,6 @@ def get_tenant_asset_infos_using_get_with_http_info(self, page_size, page, **kwa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1278,7 +1369,7 @@ def get_tenant_asset_infos_using_get_with_http_info(self, page_size, page, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataAsset', # noqa: E501 + 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'), @@ -1291,7 +1382,7 @@ def get_tenant_asset_using_get(self, asset_name, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_asset_using_get(asset_name, async_req=True) + >>> thread = api.get_tenant_asset_using_get(asset_name, async_req=True) >>> result = thread.get() :param async_req bool @@ -1312,7 +1403,7 @@ def get_tenant_asset_using_get_with_http_info(self, asset_name, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_asset_using_get_with_http_info(asset_name, async_req=True) + >>> thread = api.get_tenant_asset_using_get_with_http_info(asset_name, async_req=True) >>> result = thread.get() :param async_req bool @@ -1330,13 +1421,17 @@ def get_tenant_asset_using_get_with_http_info(self, asset_name, **kwargs): # no 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_asset_using_get" % key + ) params[key] = val del params['kwargs'] # 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 = {} @@ -1356,10 +1451,6 @@ def get_tenant_asset_using_get_with_http_info(self, asset_name, **kwargs): # no header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1384,17 +1475,17 @@ def get_tenant_assets_using_get(self, page_size, page, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_assets_using_get(page_size, page, async_req=True) + >>> thread = api.get_tenant_assets_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataAsset + :return: PageDataAsset If the method is called asynchronously, returns the request thread. """ @@ -1410,22 +1501,22 @@ def get_tenant_assets_using_get_with_http_info(self, page_size, page, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_assets_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_tenant_assets_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataAsset + :return: PageDataAsset If the method is called asynchronously, returns the request thread. """ - all_params = ['type', 'text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501 + all_params = ['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') @@ -1433,18 +1524,21 @@ def get_tenant_assets_using_get_with_http_info(self, page_size, page, **kwargs): 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_assets_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_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 = {} @@ -1474,10 +1568,6 @@ def get_tenant_assets_using_get_with_http_info(self, page_size, page, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1489,7 +1579,7 @@ def get_tenant_assets_using_get_with_http_info(self, page_size, page, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataAsset', # noqa: E501 + response_type='PageDataAsset', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1497,44 +1587,43 @@ def get_tenant_assets_using_get_with_http_info(self, page_size, page, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_asset_info_by_id_using_get(self, asset_id, **kwargs): - """getAssetInfoById # noqa: E501 + def save_asset_using_post(self, body, **kwargs): # noqa: E501 + """saveAsset # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_asset_info_by_id_using_get(asset_id, async_req=True) + >>> thread = api.save_asset_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str asset_id: assetId (required) + :param Asset body: asset (required) :return: Asset 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 + return self.save_asset_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.get_asset_info_by_id_using_get_with_http_info(asset_id, **kwargs) # noqa: E501 + (data) = self.save_asset_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def get_asset_info_by_id_using_get_with_http_info(self, asset_id, **kwargs): - """getAssetInfoById # noqa: E501 + def save_asset_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveAsset # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_asset_info_by_id_using_get_with_http_info(asset_id, async_req=True) + >>> thread = api.save_asset_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str asset_id: assetId (required) + :param Asset body: asset (required) :return: Asset If the method is called asynchronously, returns the request thread. """ - all_params = ['asset_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') @@ -1542,19 +1631,21 @@ def get_asset_info_by_id_using_get_with_http_info(self, asset_id, **kwargs): 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_using_post" % 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 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_asset_using_post`") # noqa: E501 collection_formats = {} path_params = {} - if 'asset_id' in params: - path_params['assetId'] = params['asset_id'] # noqa: E501 query_params = [] @@ -1564,6 +1655,8 @@ def get_asset_info_by_id_using_get_with_http_info(self, asset_id, **kwargs): 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( ['*/*']) # noqa: E501 @@ -1576,7 +1669,7 @@ def get_asset_info_by_id_using_get_with_http_info(self, asset_id, **kwargs): auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/asset/info/{assetId}', 'GET', + '/api/asset', 'POST', path_params, query_params, header_params, @@ -1591,59 +1684,43 @@ def get_asset_info_by_id_using_get_with_http_info(self, asset_id, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_customer_asset_infos_using_get(self, customer_id, page_size, page, **kwargs): - """getCustomerAssetInfos # noqa: E501 + def unassign_asset_from_customer_using_delete(self, asset_id, **kwargs): # noqa: E501 + """unassignAssetFromCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_asset_infos_using_get(customer_id, page_size, page, async_req=True) + >>> thread = api.unassign_asset_from_customer_using_delete(asset_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str customer_id: customerId (required) - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) + :param str asset_id: assetId (required) :return: Asset 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 + return self.unassign_asset_from_customer_using_delete_with_http_info(asset_id, **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.unassign_asset_from_customer_using_delete_with_http_info(asset_id, **kwargs) # noqa: E501 return data - def get_customer_asset_infos_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): - """getCustomerAssetInfos # noqa: E501 + def unassign_asset_from_customer_using_delete_with_http_info(self, asset_id, **kwargs): # noqa: E501 + """unassignAssetFromCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_asset_infos_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> thread = api.unassign_asset_from_customer_using_delete_with_http_info(asset_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str customer_id: customerId (required) - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) + :param str asset_id: assetId (required) :return: Asset If the method is called asynchronously, returns the request thread. """ - all_params = ['customer_id', 'type', 'text_search', 'sort_property', 'sort_order', 'page_size', - 'page'] # noqa: E501 + all_params = ['asset_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1651,128 +1728,23 @@ def get_customer_asset_infos_using_get_with_http_info(self, customer_id, page_si 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_asset_from_customer_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'asset_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 - 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`") - 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`") - - collection_formats = {} - - path_params = {} - if 'customer_id' in params: - path_params['customerId'] = params['customer_id'] # noqa: E501 - - query_params = [] - - 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 - 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 - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/customer/{customerId}/assetInfos{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Asset', # 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_using_post(self, asset, **kwargs): # noqa: E501 - """saveAsset # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_asset_using_post(asset, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param Asset asset: asset (required) - :return: Asset - 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_using_post_with_http_info(asset, **kwargs) # noqa: E501 - else: - (data) = self.save_asset_using_post_with_http_info(asset, **kwargs) # noqa: E501 - return data - - def save_asset_using_post_with_http_info(self, asset, **kwargs): # noqa: E501 - """saveAsset # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_asset_using_post_with_http_info(asset, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param Asset asset: asset (required) - :return: Asset - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['asset'] # 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']): - params[key] = val - del params['kwargs'] - # verify the required parameter 'asset' is set - if ('asset' not in params or - params['asset'] is None): - raise ValueError( - "Missing the required parameter `asset` when calling `save_asset_using_post`") # noqa: E501 + 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 collection_formats = {} path_params = {} + if 'asset_id' in params: + path_params['assetId'] = params['asset_id'] # noqa: E501 query_params = [] @@ -1782,21 +1754,15 @@ def save_asset_using_post_with_http_info(self, asset, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'asset' in params: - body_params = params['asset'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/asset', 'POST', + '/api/customer/asset/{assetId}', 'DELETE', path_params, query_params, header_params, @@ -1811,15 +1777,16 @@ def save_asset_using_post_with_http_info(self, asset, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def unassign_asset_from_customer_using_delete(self, asset_id, **kwargs): # noqa: E501 - """unassignAssetFromCustomer # noqa: E501 + def unassign_asset_from_edge_using_delete(self, edge_id, asset_id, **kwargs): # noqa: E501 + """unassignAssetFromEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_asset_from_customer_using_delete(asset_id, async_req=True) + >>> thread = api.unassign_asset_from_edge_using_delete(edge_id, asset_id, async_req=True) >>> result = thread.get() :param async_req bool + :param str edge_id: edgeId (required) :param str asset_id: assetId (required) :return: Asset If the method is called asynchronously, @@ -1827,27 +1794,28 @@ def unassign_asset_from_customer_using_delete(self, asset_id, **kwargs): # noqa """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.unassign_asset_from_customer_using_delete_with_http_info(asset_id, **kwargs) # noqa: E501 + return self.unassign_asset_from_edge_using_delete_with_http_info(edge_id, asset_id, **kwargs) # noqa: E501 else: - (data) = self.unassign_asset_from_customer_using_delete_with_http_info(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_customer_using_delete_with_http_info(self, asset_id, **kwargs): # noqa: E501 - """unassignAssetFromCustomer # noqa: E501 + def unassign_asset_from_edge_using_delete_with_http_info(self, edge_id, asset_id, **kwargs): # noqa: E501 + """unassignAssetFromEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_asset_from_customer_using_delete_with_http_info(asset_id, async_req=True) + >>> thread = api.unassign_asset_from_edge_using_delete_with_http_info(edge_id, asset_id, async_req=True) >>> result = thread.get() :param async_req bool + :param str edge_id: edgeId (required) :param str asset_id: assetId (required) :return: Asset If the method is called asynchronously, returns the request thread. """ - all_params = ['asset_id'] # noqa: E501 + all_params = ['edge_id', 'asset_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1855,17 +1823,27 @@ def unassign_asset_from_customer_using_delete_with_http_info(self, asset_id, **k 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_asset_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_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_customer_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `asset_id` when calling `unassign_asset_from_edge_using_delete`") # noqa: E501 collection_formats = {} path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 if 'asset_id' in params: path_params['assetId'] = params['asset_id'] # noqa: E501 @@ -1881,15 +1859,11 @@ def unassign_asset_from_customer_using_delete_with_http_info(self, asset_id, **k header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/customer/asset/{assetId}', 'DELETE', + '/api/edge/{edgeId}/asset/{assetId}', 'DELETE', path_params, query_params, header_params, 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 e6c38fef..b90874d0 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class AuditLogControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -34,55 +32,59 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def get_audit_logs_by_customer_id_using_get(self, customer_id, limit, **kwargs): # noqa: E501 + def get_audit_logs_by_customer_id_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 """getAuditLogsByCustomerId # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_by_customer_id_using_get(customer_id, limit, async_req=True) + >>> thread = api.get_audit_logs_by_customer_id_using_get(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str customer_id: customerId (required) - :param str limit: limit (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder :param int start_time: startTime :param int end_time: endTime - :param bool asc_order: ascOrder - :param str offset: offset :param str action_types: actionTypes - :return: TimePageDataAuditLog + :return: PageDataAuditLog If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_audit_logs_by_customer_id_using_get_with_http_info(customer_id, limit, **kwargs) # noqa: E501 + return self.get_audit_logs_by_customer_id_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_audit_logs_by_customer_id_using_get_with_http_info(customer_id, limit, **kwargs) # noqa: E501 + (data) = self.get_audit_logs_by_customer_id_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 return data - def get_audit_logs_by_customer_id_using_get_with_http_info(self, customer_id, limit, **kwargs): # noqa: E501 + def get_audit_logs_by_customer_id_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 """getAuditLogsByCustomerId # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_by_customer_id_using_get_with_http_info(customer_id, limit, async_req=True) + >>> thread = api.get_audit_logs_by_customer_id_using_get_with_http_info(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str customer_id: customerId (required) - :param str limit: limit (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder :param int start_time: startTime :param int end_time: endTime - :param bool asc_order: ascOrder - :param str offset: offset :param str action_types: actionTypes - :return: TimePageDataAuditLog + :return: PageDataAuditLog If the method is called asynchronously, returns the request thread. """ - all_params = ['customer_id', 'limit', 'start_time', 'end_time', 'asc_order', 'offset', 'action_types'] # noqa: E501 + all_params = ['customer_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'action_types'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -90,17 +92,25 @@ def get_audit_logs_by_customer_id_using_get_with_http_info(self, customer_id, li 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_audit_logs_by_customer_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_audit_logs_by_customer_id_using_get`") # noqa: E501 - # verify the required parameter 'limit' is set - if ('limit' not in params or - params['limit'] is None): - raise ValueError("Missing the required parameter `limit` when calling `get_audit_logs_by_customer_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_audit_logs_by_customer_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_audit_logs_by_customer_id_using_get`") # noqa: E501 collection_formats = {} @@ -109,18 +119,22 @@ def get_audit_logs_by_customer_id_using_get_with_http_info(self, customer_id, li path_params['customerId'] = params['customer_id'] # noqa: E501 query_params = [] + 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 - if 'asc_order' in params: - query_params.append(('ascOrder', params['asc_order'])) # noqa: E501 - if 'offset' in params: - query_params.append(('offset', params['offset'])) # noqa: E501 if 'action_types' in params: query_params.append(('actionTypes', params['action_types'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # 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 header_params = {} @@ -132,22 +146,18 @@ def get_audit_logs_by_customer_id_using_get_with_http_info(self, customer_id, li header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/audit/logs/customer/{customerId}{?startTime,endTime,ascOrder,offset,actionTypes,limit}', 'GET', + '/api/audit/logs/customer/{customerId}{?textSearch,sortProperty,sortOrder,startTime,endTime,actionTypes,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TimePageDataAuditLog', # noqa: E501 + response_type='PageDataAuditLog', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -155,57 +165,61 @@ def get_audit_logs_by_customer_id_using_get_with_http_info(self, customer_id, li _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_audit_logs_by_entity_id_using_get(self, entity_type, entity_id, limit, **kwargs): # noqa: E501 + def get_audit_logs_by_entity_id_using_get(self, entity_type, entity_id, page_size, page, **kwargs): # noqa: E501 """getAuditLogsByEntityId # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_by_entity_id_using_get(entity_type, entity_id, limit, async_req=True) + >>> thread = api.get_audit_logs_by_entity_id_using_get(entity_type, entity_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str entity_type: entityType (required) :param str entity_id: entityId (required) - :param str limit: limit (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder :param int start_time: startTime :param int end_time: endTime - :param bool asc_order: ascOrder - :param str offset: offset :param str action_types: actionTypes - :return: TimePageDataAuditLog + :return: PageDataAuditLog If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_audit_logs_by_entity_id_using_get_with_http_info(entity_type, entity_id, limit, **kwargs) # noqa: E501 + return self.get_audit_logs_by_entity_id_using_get_with_http_info(entity_type, entity_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_audit_logs_by_entity_id_using_get_with_http_info(entity_type, entity_id, limit, **kwargs) # noqa: E501 + (data) = self.get_audit_logs_by_entity_id_using_get_with_http_info(entity_type, entity_id, page_size, page, **kwargs) # noqa: E501 return data - def get_audit_logs_by_entity_id_using_get_with_http_info(self, entity_type, entity_id, limit, **kwargs): # noqa: E501 + def get_audit_logs_by_entity_id_using_get_with_http_info(self, entity_type, entity_id, page_size, page, **kwargs): # noqa: E501 """getAuditLogsByEntityId # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_by_entity_id_using_get_with_http_info(entity_type, entity_id, limit, async_req=True) + >>> thread = api.get_audit_logs_by_entity_id_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: entityType (required) :param str entity_id: entityId (required) - :param str limit: limit (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder :param int start_time: startTime :param int end_time: endTime - :param bool asc_order: ascOrder - :param str offset: offset :param str action_types: actionTypes - :return: TimePageDataAuditLog + :return: PageDataAuditLog If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'limit', 'start_time', 'end_time', 'asc_order', 'offset', 'action_types'] # noqa: E501 + all_params = ['entity_type', 'entity_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'action_types'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -213,7 +227,11 @@ def get_audit_logs_by_entity_id_using_get_with_http_info(self, entity_type, enti 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_audit_logs_by_entity_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_type' is set @@ -224,10 +242,14 @@ def get_audit_logs_by_entity_id_using_get_with_http_info(self, entity_type, enti if ('entity_id' not in params or params['entity_id'] is None): raise ValueError("Missing the required parameter `entity_id` when calling `get_audit_logs_by_entity_id_using_get`") # noqa: E501 - # verify the required parameter 'limit' is set - if ('limit' not in params or - params['limit'] is None): - raise ValueError("Missing the required parameter `limit` when calling `get_audit_logs_by_entity_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_audit_logs_by_entity_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_audit_logs_by_entity_id_using_get`") # noqa: E501 collection_formats = {} @@ -238,18 +260,22 @@ def get_audit_logs_by_entity_id_using_get_with_http_info(self, entity_type, enti path_params['entityId'] = params['entity_id'] # noqa: E501 query_params = [] + 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 - if 'asc_order' in params: - query_params.append(('ascOrder', params['asc_order'])) # noqa: E501 - if 'offset' in params: - query_params.append(('offset', params['offset'])) # noqa: E501 if 'action_types' in params: query_params.append(('actionTypes', params['action_types'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # 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 header_params = {} @@ -261,22 +287,18 @@ def get_audit_logs_by_entity_id_using_get_with_http_info(self, entity_type, enti header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/audit/logs/entity/{entityType}/{entityId}{?startTime,endTime,ascOrder,offset,actionTypes,limit}', 'GET', + '/api/audit/logs/entity/{entityType}/{entityId}{?textSearch,sortProperty,sortOrder,startTime,endTime,actionTypes,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TimePageDataAuditLog', # noqa: E501 + response_type='PageDataAuditLog', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -284,55 +306,59 @@ def get_audit_logs_by_entity_id_using_get_with_http_info(self, entity_type, enti _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_audit_logs_by_user_id_using_get(self, user_id, limit, **kwargs): # noqa: E501 + def get_audit_logs_by_user_id_using_get(self, user_id, page_size, page, **kwargs): # noqa: E501 """getAuditLogsByUserId # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_by_user_id_using_get(user_id, limit, async_req=True) + >>> thread = api.get_audit_logs_by_user_id_using_get(user_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str user_id: userId (required) - :param str limit: limit (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder :param int start_time: startTime :param int end_time: endTime - :param bool asc_order: ascOrder - :param str offset: offset :param str action_types: actionTypes - :return: TimePageDataAuditLog + :return: PageDataAuditLog If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_audit_logs_by_user_id_using_get_with_http_info(user_id, limit, **kwargs) # noqa: E501 + return self.get_audit_logs_by_user_id_using_get_with_http_info(user_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_audit_logs_by_user_id_using_get_with_http_info(user_id, limit, **kwargs) # noqa: E501 + (data) = self.get_audit_logs_by_user_id_using_get_with_http_info(user_id, page_size, page, **kwargs) # noqa: E501 return data - def get_audit_logs_by_user_id_using_get_with_http_info(self, user_id, limit, **kwargs): # noqa: E501 + def get_audit_logs_by_user_id_using_get_with_http_info(self, user_id, page_size, page, **kwargs): # noqa: E501 """getAuditLogsByUserId # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_by_user_id_using_get_with_http_info(user_id, limit, async_req=True) + >>> thread = api.get_audit_logs_by_user_id_using_get_with_http_info(user_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str user_id: userId (required) - :param str limit: limit (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder :param int start_time: startTime :param int end_time: endTime - :param bool asc_order: ascOrder - :param str offset: offset :param str action_types: actionTypes - :return: TimePageDataAuditLog + :return: PageDataAuditLog If the method is called asynchronously, returns the request thread. """ - all_params = ['user_id', 'limit', 'start_time', 'end_time', 'asc_order', 'offset', 'action_types'] # noqa: E501 + all_params = ['user_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'action_types'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -340,17 +366,25 @@ def get_audit_logs_by_user_id_using_get_with_http_info(self, user_id, limit, **k 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_audit_logs_by_user_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_audit_logs_by_user_id_using_get`") # noqa: E501 - # verify the required parameter 'limit' is set - if ('limit' not in params or - params['limit'] is None): - raise ValueError("Missing the required parameter `limit` when calling `get_audit_logs_by_user_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_audit_logs_by_user_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_audit_logs_by_user_id_using_get`") # noqa: E501 collection_formats = {} @@ -359,18 +393,22 @@ def get_audit_logs_by_user_id_using_get_with_http_info(self, user_id, limit, **k path_params['userId'] = params['user_id'] # noqa: E501 query_params = [] + 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 - if 'asc_order' in params: - query_params.append(('ascOrder', params['asc_order'])) # noqa: E501 - if 'offset' in params: - query_params.append(('offset', params['offset'])) # noqa: E501 if 'action_types' in params: query_params.append(('actionTypes', params['action_types'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # 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 header_params = {} @@ -382,22 +420,18 @@ def get_audit_logs_by_user_id_using_get_with_http_info(self, user_id, limit, **k header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/audit/logs/user/{userId}{?startTime,endTime,ascOrder,offset,actionTypes,limit}', 'GET', + '/api/audit/logs/user/{userId}{?textSearch,sortProperty,sortOrder,startTime,endTime,actionTypes,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TimePageDataAuditLog', # noqa: E501 + response_type='PageDataAuditLog', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -405,53 +439,57 @@ def get_audit_logs_by_user_id_using_get_with_http_info(self, user_id, limit, **k _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_audit_logs_using_get(self, limit, **kwargs): # noqa: E501 + def get_audit_logs_using_get(self, page_size, page, **kwargs): # noqa: E501 """getAuditLogs # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_using_get(limit, async_req=True) + >>> thread = api.get_audit_logs_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str limit: limit (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder :param int start_time: startTime :param int end_time: endTime - :param bool asc_order: ascOrder - :param str offset: offset :param str action_types: actionTypes - :return: TimePageDataAuditLog + :return: PageDataAuditLog If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_audit_logs_using_get_with_http_info(limit, **kwargs) # noqa: E501 + return self.get_audit_logs_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_audit_logs_using_get_with_http_info(limit, **kwargs) # noqa: E501 + (data) = self.get_audit_logs_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def get_audit_logs_using_get_with_http_info(self, limit, **kwargs): # noqa: E501 + def get_audit_logs_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 """getAuditLogs # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_using_get_with_http_info(limit, async_req=True) + >>> thread = api.get_audit_logs_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str limit: limit (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder :param int start_time: startTime :param int end_time: endTime - :param bool asc_order: ascOrder - :param str offset: offset :param str action_types: actionTypes - :return: TimePageDataAuditLog + :return: PageDataAuditLog If the method is called asynchronously, returns the request thread. """ - all_params = ['limit', 'start_time', 'end_time', 'asc_order', 'offset', 'action_types'] # noqa: E501 + all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'action_types'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -459,31 +497,43 @@ def get_audit_logs_using_get_with_http_info(self, limit, **kwargs): # noqa: E50 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_audit_logs_using_get" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'limit' is set - if ('limit' not in params or - params['limit'] is None): - raise ValueError("Missing the required parameter `limit` when calling `get_audit_logs_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_audit_logs_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_audit_logs_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + 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 - if 'asc_order' in params: - query_params.append(('ascOrder', params['asc_order'])) # noqa: E501 - if 'offset' in params: - query_params.append(('offset', params['offset'])) # noqa: E501 if 'action_types' in params: query_params.append(('actionTypes', params['action_types'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # 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 header_params = {} @@ -495,22 +545,18 @@ def get_audit_logs_using_get_with_http_info(self, limit, **kwargs): # noqa: E50 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/audit/logs{?startTime,endTime,ascOrder,offset,actionTypes,limit}', 'GET', + '/api/audit/logs{?textSearch,sortProperty,sortOrder,startTime,endTime,actionTypes,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TimePageDataAuditLog', # noqa: E501 + response_type='PageDataAuditLog', # 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/auth_controller_api.py b/tb_rest_client/api/api_ce/auth_controller_api.py index 521f33ca..4bbd260c 100644 --- a/tb_rest_client/api/api_ce/auth_controller_api.py +++ b/tb_rest_client/api/api_ce/auth_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class AuthControllerApi(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 """ @@ -34,16 +32,16 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def activate_user_using_post(self, activate_request, **kwargs): # noqa: E501 + def activate_user_using_post(self, body, **kwargs): # noqa: E501 """activateUser # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.activate_user_using_post(activate_request, async_req=True) + >>> thread = api.activate_user_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param dict activate_request: activateRequest (required) + :param str body: activateRequest (required) :param bool send_activation_mail: sendActivationMail :return: str If the method is called asynchronously, @@ -51,28 +49,28 @@ def activate_user_using_post(self, activate_request, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.activate_user_using_post_with_http_info(activate_request, **kwargs) # noqa: E501 + return self.activate_user_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.activate_user_using_post_with_http_info(activate_request, **kwargs) # noqa: E501 + (data) = self.activate_user_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def activate_user_using_post_with_http_info(self, activate_request, **kwargs): # noqa: E501 + def activate_user_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """activateUser # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.activate_user_using_post_with_http_info(activate_request, async_req=True) + >>> thread = api.activate_user_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param activate_request: activateRequest (required) + :param str body: activateRequest (required) :param bool send_activation_mail: sendActivationMail :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['activate_request', 'send_activation_mail'] # noqa: E501 + all_params = ['body', 'send_activation_mail'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -80,13 +78,17 @@ def activate_user_using_post_with_http_info(self, activate_request, **kwargs): 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_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'activate_request' is set - if ('activate_request' not in params or - params['activate_request'] is None): - raise ValueError("Missing the required parameter `activate_request` when calling `activate_user_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `activate_user_using_post`") # noqa: E501 collection_formats = {} @@ -102,8 +104,8 @@ def activate_user_using_post_with_http_info(self, activate_request, **kwargs): local_var_files = {} body_params = None - if 'activate_request' in params: - body_params = params['activate_request'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -131,43 +133,43 @@ def activate_user_using_post_with_http_info(self, activate_request, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def change_password_using_post(self, change_password_request, **kwargs): # noqa: E501 + def change_password_using_post(self, body, **kwargs): # noqa: E501 """changePassword # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.change_password_using_post(change_password_request, async_req=True) + >>> thread = api.change_password_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str change_password_request: changePasswordRequest (required) - :return: None + :param str body: changePasswordRequest (required) + :return: ObjectNode If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.change_password_using_post_with_http_info(change_password_request, **kwargs) # noqa: E501 + return self.change_password_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.change_password_using_post_with_http_info(change_password_request, **kwargs) # noqa: E501 + (data) = self.change_password_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def change_password_using_post_with_http_info(self, change_password_request, **kwargs): # noqa: E501 + def change_password_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """changePassword # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.change_password_using_post_with_http_info(change_password_request, async_req=True) + >>> thread = api.change_password_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str change_password_request: changePasswordRequest (required) - :return: None + :param str body: changePasswordRequest (required) + :return: ObjectNode If the method is called asynchronously, returns the request thread. """ - all_params = ['change_password_request'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -175,13 +177,17 @@ def change_password_using_post_with_http_info(self, change_password_request, **k 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 change_password_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'change_password_request' is set - if ('change_password_request' not in params or - params['change_password_request'] is None): - raise ValueError("Missing the required parameter `change_password_request` when calling `change_password_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `change_password_using_post`") # noqa: E501 collection_formats = {} @@ -195,8 +201,8 @@ def change_password_using_post_with_http_info(self, change_password_request, **k local_var_files = {} body_params = None - if 'change_password_request' in params: - body_params = params['change_password_request'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -216,7 +222,7 @@ def change_password_using_post_with_http_info(self, change_password_request, **k body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='ObjectNode', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -229,7 +235,7 @@ def check_activate_token_using_get(self, activate_token, **kwargs): # noqa: E50 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.check_activate_token_using_get(activate_token, async_req=True) + >>> thread = api.check_activate_token_using_get(activate_token, async_req=True) >>> result = thread.get() :param async_req bool @@ -250,7 +256,7 @@ def check_activate_token_using_get_with_http_info(self, activate_token, **kwargs This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.check_activate_token_using_get_with_http_info(activate_token, async_req=True) + >>> thread = api.check_activate_token_using_get_with_http_info(activate_token, async_req=True) >>> result = thread.get() :param async_req bool @@ -268,7 +274,11 @@ def check_activate_token_using_get_with_http_info(self, activate_token, **kwargs 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_activate_token_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'activate_token' is set @@ -294,10 +304,6 @@ def check_activate_token_using_get_with_http_info(self, activate_token, **kwargs header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -322,7 +328,7 @@ def check_reset_token_using_get(self, reset_token, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.check_reset_token_using_get(reset_token, async_req=True) + >>> thread = api.check_reset_token_using_get(reset_token, async_req=True) >>> result = thread.get() :param async_req bool @@ -343,7 +349,7 @@ def check_reset_token_using_get_with_http_info(self, reset_token, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.check_reset_token_using_get_with_http_info(reset_token, async_req=True) + >>> thread = api.check_reset_token_using_get_with_http_info(reset_token, async_req=True) >>> result = thread.get() :param async_req bool @@ -361,7 +367,11 @@ def check_reset_token_using_get_with_http_info(self, reset_token, **kwargs): # 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_reset_token_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'reset_token' is set @@ -387,10 +397,6 @@ def check_reset_token_using_get_with_http_info(self, reset_token, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -410,97 +416,12 @@ def check_reset_token_using_get_with_http_info(self, reset_token, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_o_auth2_clients_using_post(self, **kwargs): # noqa: E501 - """getOAuth2Clients # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_o_auth2_clients_using_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[OAuth2ClientInfo] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_o_auth2_clients_using_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_o_auth2_clients_using_post_with_http_info(**kwargs) # noqa: E501 - return data - - def get_o_auth2_clients_using_post_with_http_info(self, **kwargs): # noqa: E501 - """getOAuth2Clients # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_o_auth2_clients_using_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[OAuth2ClientInfo] - 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']): - - 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( - ['*/*']) # 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/oauth2Clients', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OAuth2ClientInfo]', # 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_password_policy_using_get(self, **kwargs): # noqa: E501 """getUserPasswordPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_password_policy_using_get(async_req=True) + >>> thread = api.get_user_password_policy_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -520,7 +441,7 @@ def get_user_password_policy_using_get_with_http_info(self, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_password_policy_using_get_with_http_info(async_req=True) + >>> thread = api.get_user_password_policy_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -537,7 +458,11 @@ def get_user_password_policy_using_get_with_http_info(self, **kwargs): # noqa: 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_password_policy_using_get" % key + ) params[key] = val del params['kwargs'] @@ -557,10 +482,6 @@ def get_user_password_policy_using_get_with_http_info(self, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -585,7 +506,7 @@ def get_user_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_using_get(async_req=True) + >>> thread = api.get_user_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -605,7 +526,7 @@ def get_user_using_get_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_using_get_with_http_info(async_req=True) + >>> thread = api.get_user_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -622,7 +543,11 @@ def get_user_using_get_with_http_info(self, **kwargs): # noqa: E501 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_using_get" % key + ) params[key] = val del params['kwargs'] @@ -642,10 +567,6 @@ def get_user_using_get_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -670,7 +591,7 @@ def logout_using_post(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.logout_using_post(async_req=True) + >>> thread = api.logout_using_post(async_req=True) >>> result = thread.get() :param async_req bool @@ -690,7 +611,7 @@ def logout_using_post_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.logout_using_post_with_http_info(async_req=True) + >>> thread = api.logout_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -707,7 +628,11 @@ def logout_using_post_with_http_info(self, **kwargs): # noqa: E501 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 logout_using_post" % key + ) params[key] = val del params['kwargs'] @@ -723,14 +648,6 @@ def logout_using_post_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -750,43 +667,43 @@ def logout_using_post_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def request_reset_password_by_email_using_post(self, reset_password_by_email_request, **kwargs): # noqa: E501 + def request_reset_password_by_email_using_post(self, body, **kwargs): # noqa: E501 """requestResetPasswordByEmail # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.request_reset_password_by_email_using_post(reset_password_by_email_request, async_req=True) + >>> thread = api.request_reset_password_by_email_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str reset_password_by_email_request: resetPasswordByEmailRequest (required) + :param str body: resetPasswordByEmailRequest (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_reset_password_by_email_using_post_with_http_info(reset_password_by_email_request, **kwargs) # noqa: E501 + return self.request_reset_password_by_email_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.request_reset_password_by_email_using_post_with_http_info(reset_password_by_email_request, **kwargs) # noqa: E501 + (data) = self.request_reset_password_by_email_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def request_reset_password_by_email_using_post_with_http_info(self, reset_password_by_email_request, **kwargs): # noqa: E501 + def request_reset_password_by_email_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """requestResetPasswordByEmail # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.request_reset_password_by_email_using_post_with_http_info(reset_password_by_email_request, async_req=True) + >>> thread = api.request_reset_password_by_email_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str reset_password_by_email_request: resetPasswordByEmailRequest (required) + :param str body: resetPasswordByEmailRequest (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['reset_password_by_email_request'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -794,13 +711,17 @@ def request_reset_password_by_email_using_post_with_http_info(self, reset_passwo 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_reset_password_by_email_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'reset_password_by_email_request' is set - if ('reset_password_by_email_request' not in params or - params['reset_password_by_email_request'] is None): - raise ValueError("Missing the required parameter `reset_password_by_email_request` when calling `request_reset_password_by_email_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `request_reset_password_by_email_using_post`") # noqa: E501 collection_formats = {} @@ -814,12 +735,8 @@ def request_reset_password_by_email_using_post_with_http_info(self, reset_passwo local_var_files = {} body_params = None - if 'reset_password_by_email_request' in params: - body_params = params['reset_password_by_email_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -843,43 +760,43 @@ def request_reset_password_by_email_using_post_with_http_info(self, reset_passwo _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def reset_password_using_post(self, reset_password_request, **kwargs): # noqa: E501 + def reset_password_using_post(self, body, **kwargs): # noqa: E501 """resetPassword # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.reset_password_using_post(reset_password_request, async_req=True) + >>> thread = api.reset_password_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str reset_password_request: resetPasswordRequest (required) + :param str body: resetPasswordRequest (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.reset_password_using_post_with_http_info(reset_password_request, **kwargs) # noqa: E501 + return self.reset_password_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.reset_password_using_post_with_http_info(reset_password_request, **kwargs) # noqa: E501 + (data) = self.reset_password_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def reset_password_using_post_with_http_info(self, reset_password_request, **kwargs): # noqa: E501 + def reset_password_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """resetPassword # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.reset_password_using_post_with_http_info(reset_password_request, async_req=True) + >>> thread = api.reset_password_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str reset_password_request: resetPasswordRequest (required) + :param str body: resetPasswordRequest (required) :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['reset_password_request'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -887,13 +804,17 @@ def reset_password_using_post_with_http_info(self, reset_password_request, **kwa 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 reset_password_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'reset_password_request' is set - if ('reset_password_request' not in params or - params['reset_password_request'] is None): - raise ValueError("Missing the required parameter `reset_password_request` when calling `reset_password_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `reset_password_using_post`") # noqa: E501 collection_formats = {} @@ -907,8 +828,8 @@ def reset_password_using_post_with_http_info(self, reset_password_request, **kwa local_var_files = {} body_params = None - if 'reset_password_request' in params: - body_params = params['reset_password_request'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 625401cc..42e6068a 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class ComponentDescriptorControllerApi(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 """ @@ -39,7 +37,7 @@ def get_component_descriptor_by_clazz_using_get(self, component_descriptor_clazz This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_component_descriptor_by_clazz_using_get(component_descriptor_clazz, async_req=True) + >>> thread = api.get_component_descriptor_by_clazz_using_get(component_descriptor_clazz, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +58,7 @@ def get_component_descriptor_by_clazz_using_get_with_http_info(self, component_d This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_component_descriptor_by_clazz_using_get_with_http_info(component_descriptor_clazz, async_req=True) + >>> thread = api.get_component_descriptor_by_clazz_using_get_with_http_info(component_descriptor_clazz, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,7 +76,11 @@ def get_component_descriptor_by_clazz_using_get_with_http_info(self, component_d 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_component_descriptor_by_clazz_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'component_descriptor_clazz' is set @@ -104,10 +106,6 @@ def get_component_descriptor_by_clazz_using_get_with_http_info(self, component_d header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -132,11 +130,12 @@ def get_component_descriptors_by_type_using_get(self, component_type, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_component_descriptors_by_type_using_get(component_type, async_req=True) + >>> thread = api.get_component_descriptors_by_type_using_get(component_type, async_req=True) >>> result = thread.get() :param async_req bool :param str component_type: componentType (required) + :param str rule_chain_type: ruleChainType :return: list[ComponentDescriptor] If the method is called asynchronously, returns the request thread. @@ -153,11 +152,12 @@ def get_component_descriptors_by_type_using_get_with_http_info(self, component_t This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_component_descriptors_by_type_using_get_with_http_info(component_type, async_req=True) + >>> thread = api.get_component_descriptors_by_type_using_get_with_http_info(component_type, async_req=True) >>> result = thread.get() :param async_req bool :param str component_type: componentType (required) + :param str rule_chain_type: ruleChainType :return: list[ComponentDescriptor] If the method is called asynchronously, returns the request thread. @@ -171,7 +171,11 @@ def get_component_descriptors_by_type_using_get_with_http_info(self, component_t 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_component_descriptors_by_type_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'component_type' is set @@ -186,7 +190,6 @@ def get_component_descriptors_by_type_using_get_with_http_info(self, component_t path_params['componentType'] = params['component_type'] # noqa: E501 query_params = [] - if 'rule_chain_type' in params: query_params.append(('ruleChainType', params['rule_chain_type'])) # noqa: E501 @@ -200,10 +203,6 @@ def get_component_descriptors_by_type_using_get_with_http_info(self, component_t header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -228,11 +227,12 @@ def get_component_descriptors_by_types_using_get(self, component_types, **kwargs This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_component_descriptors_by_types_using_get(component_types, async_req=True) + >>> thread = api.get_component_descriptors_by_types_using_get(component_types, async_req=True) >>> result = thread.get() :param async_req bool :param str component_types: componentTypes (required) + :param str rule_chain_type: ruleChainType :return: list[ComponentDescriptor] If the method is called asynchronously, returns the request thread. @@ -249,11 +249,12 @@ def get_component_descriptors_by_types_using_get_with_http_info(self, component_ This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_component_descriptors_by_types_using_get_with_http_info(component_types, async_req=True) + >>> thread = api.get_component_descriptors_by_types_using_get_with_http_info(component_types, async_req=True) >>> result = thread.get() :param async_req bool :param str component_types: componentTypes (required) + :param str rule_chain_type: ruleChainType :return: list[ComponentDescriptor] If the method is called asynchronously, returns the request thread. @@ -267,7 +268,11 @@ def get_component_descriptors_by_types_using_get_with_http_info(self, component_ 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_component_descriptors_by_types_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'component_types' is set @@ -280,10 +285,10 @@ def get_component_descriptors_by_types_using_get_with_http_info(self, component_ path_params = {} query_params = [] - if 'component_types' in params: - query_params.append(('componentTypes', params['component_types'])) # noqa: E501 if 'rule_chain_type' in params: query_params.append(('ruleChainType', params['rule_chain_type'])) # noqa: E501 + if 'component_types' in params: + query_params.append(('componentTypes', params['component_types'])) # noqa: E501 header_params = {} @@ -295,10 +300,6 @@ def get_component_descriptors_by_types_using_get_with_http_info(self, component_ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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_ce/customer_controller_api.py b/tb_rest_client/api/api_ce/customer_controller_api.py index dfb94a96..c57eefd1 100644 --- a/tb_rest_client/api/api_ce/customer_controller_api.py +++ b/tb_rest_client/api/api_ce/customer_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class CustomerControllerApi(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 """ @@ -39,7 +37,7 @@ def delete_customer_using_delete(self, customer_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_customer_using_delete(customer_id, async_req=True) + >>> thread = api.delete_customer_using_delete(customer_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +58,7 @@ def delete_customer_using_delete_with_http_info(self, customer_id, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_customer_using_delete_with_http_info(customer_id, async_req=True) + >>> thread = api.delete_customer_using_delete_with_http_info(customer_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,7 +76,11 @@ def delete_customer_using_delete_with_http_info(self, customer_id, **kwargs): # 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_customer_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'customer_id' is set @@ -100,14 +102,6 @@ def delete_customer_using_delete_with_http_info(self, customer_id, **kwargs): # local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -132,7 +126,7 @@ def get_customer_by_id_using_get(self, customer_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_by_id_using_get(customer_id, async_req=True) + >>> thread = api.get_customer_by_id_using_get(customer_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -153,7 +147,7 @@ def get_customer_by_id_using_get_with_http_info(self, customer_id, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_by_id_using_get_with_http_info(customer_id, async_req=True) + >>> thread = api.get_customer_by_id_using_get_with_http_info(customer_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -171,7 +165,11 @@ def get_customer_by_id_using_get_with_http_info(self, customer_id, **kwargs): # 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_by_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'customer_id' is set @@ -197,10 +195,6 @@ def get_customer_by_id_using_get_with_http_info(self, customer_id, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -225,7 +219,7 @@ def get_customer_title_by_id_using_get(self, customer_id, **kwargs): # noqa: E5 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_title_by_id_using_get(customer_id, async_req=True) + >>> thread = api.get_customer_title_by_id_using_get(customer_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -246,7 +240,7 @@ def get_customer_title_by_id_using_get_with_http_info(self, customer_id, **kwarg This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_title_by_id_using_get_with_http_info(customer_id, async_req=True) + >>> thread = api.get_customer_title_by_id_using_get_with_http_info(customer_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -264,7 +258,11 @@ def get_customer_title_by_id_using_get_with_http_info(self, customer_id, **kwarg 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_title_by_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'customer_id' is set @@ -290,10 +288,6 @@ def get_customer_title_by_id_using_get_with_http_info(self, customer_id, **kwarg header_params['Accept'] = self.api_client.select_header_accept( ['application/text']) # 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 @@ -318,16 +312,16 @@ def get_customers_using_get(self, page_size, page, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customers_using_get(page_size, page, async_req=True) + >>> thread = api.get_customers_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataCustomer + :return: PageDataCustomer If the method is called asynchronously, returns the request thread. """ @@ -343,21 +337,21 @@ def get_customers_using_get_with_http_info(self, page_size, page, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customers_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_customers_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataCustomer + :return: PageDataCustomer If the method is called asynchronously, returns the request thread. """ - all_params = ['text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # 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') @@ -365,7 +359,11 @@ def get_customers_using_get_with_http_info(self, page_size, page, **kwargs): # 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_customers_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set @@ -403,10 +401,6 @@ def get_customers_using_get_with_http_info(self, page_size, page, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -418,7 +412,7 @@ def get_customers_using_get_with_http_info(self, page_size, page, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataCustomer', # noqa: E501 + response_type='PageDataCustomer', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -431,7 +425,7 @@ def get_short_customer_info_by_id_using_get(self, customer_id, **kwargs): # noq This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_short_customer_info_by_id_using_get(customer_id, async_req=True) + >>> thread = api.get_short_customer_info_by_id_using_get(customer_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -452,7 +446,7 @@ def get_short_customer_info_by_id_using_get_with_http_info(self, customer_id, ** This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_short_customer_info_by_id_using_get_with_http_info(customer_id, async_req=True) + >>> thread = api.get_short_customer_info_by_id_using_get_with_http_info(customer_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -470,7 +464,11 @@ def get_short_customer_info_by_id_using_get_with_http_info(self, customer_id, ** 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_short_customer_info_by_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'customer_id' is set @@ -496,10 +494,6 @@ def get_short_customer_info_by_id_using_get_with_http_info(self, customer_id, ** header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -524,7 +518,7 @@ def get_tenant_customer_using_get(self, customer_title, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_customer_using_get(customer_title, async_req=True) + >>> thread = api.get_tenant_customer_using_get(customer_title, async_req=True) >>> result = thread.get() :param async_req bool @@ -545,7 +539,7 @@ def get_tenant_customer_using_get_with_http_info(self, customer_title, **kwargs) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_customer_using_get_with_http_info(customer_title, async_req=True) + >>> thread = api.get_tenant_customer_using_get_with_http_info(customer_title, async_req=True) >>> result = thread.get() :param async_req bool @@ -563,7 +557,11 @@ def get_tenant_customer_using_get_with_http_info(self, customer_title, **kwargs) 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_customer_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'customer_title' is set @@ -589,10 +587,6 @@ def get_tenant_customer_using_get_with_http_info(self, customer_title, **kwargs) header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -612,43 +606,43 @@ def get_tenant_customer_using_get_with_http_info(self, customer_title, **kwargs) _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_customer_using_post(self, customer, **kwargs): # noqa: E501 + def save_customer_using_post(self, body, **kwargs): # noqa: E501 """saveCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_customer_using_post(customer, async_req=True) + >>> thread = api.save_customer_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Customer customer: customer (required) + :param Customer body: customer (required) :return: Customer If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_customer_using_post_with_http_info(customer, **kwargs) # noqa: E501 + return self.save_customer_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_customer_using_post_with_http_info(customer, **kwargs) # noqa: E501 + (data) = self.save_customer_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_customer_using_post_with_http_info(self, customer, **kwargs): # noqa: E501 + def save_customer_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_customer_using_post_with_http_info(customer, async_req=True) + >>> thread = api.save_customer_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Customer customer: customer (required) + :param Customer body: customer (required) :return: Customer If the method is called asynchronously, returns the request thread. """ - all_params = ['customer'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -656,13 +650,17 @@ def save_customer_using_post_with_http_info(self, customer, **kwargs): # noqa: 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_customer_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'customer' is set - if ('customer' not in params or - params['customer'] is None): - raise ValueError("Missing the required parameter `customer` when calling `save_customer_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_customer_using_post`") # noqa: E501 collection_formats = {} @@ -676,8 +674,8 @@ def save_customer_using_post_with_http_info(self, customer, **kwargs): # noqa: local_var_files = {} body_params = None - if 'customer' in params: - body_params = params['customer'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 f022ac57..f57af7d8 100644 --- a/tb_rest_client/api/api_ce/dashboard_controller_api.py +++ b/tb_rest_client/api/api_ce/dashboard_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class DashboardControllerApi(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 """ @@ -34,47 +32,45 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def add_dashboard_customers_using_post(self, dashboard_id, str_customer_ids, **kwargs): # noqa: E501 + def add_dashboard_customers_using_post(self, body, dashboard_id, **kwargs): # noqa: E501 """addDashboardCustomers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.add_dashboard_customers_using_post(dashboard_id, str_customer_ids, async_req=True) + >>> thread = api.add_dashboard_customers_using_post(body, dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool + :param list[str] body: strCustomerIds (required) :param str dashboard_id: dashboardId (required) - :param list[str] str_customer_ids: strCustomerIds (required) :return: Dashboard If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.add_dashboard_customers_using_post_with_http_info(dashboard_id, str_customer_ids, - **kwargs) # noqa: E501 + return self.add_dashboard_customers_using_post_with_http_info(body, dashboard_id, **kwargs) # noqa: E501 else: - (data) = self.add_dashboard_customers_using_post_with_http_info(dashboard_id, str_customer_ids, - **kwargs) # noqa: E501 + (data) = self.add_dashboard_customers_using_post_with_http_info(body, dashboard_id, **kwargs) # noqa: E501 return data - def add_dashboard_customers_using_post_with_http_info(self, dashboard_id, str_customer_ids, **kwargs): # noqa: E501 + def add_dashboard_customers_using_post_with_http_info(self, body, dashboard_id, **kwargs): # noqa: E501 """addDashboardCustomers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.add_dashboard_customers_using_post_with_http_info(dashboard_id, str_customer_ids, async_req=True) + >>> thread = api.add_dashboard_customers_using_post_with_http_info(body, dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool + :param list[str] body: strCustomerIds (required) :param str dashboard_id: dashboardId (required) - :param list[str] str_customer_ids: strCustomerIds (required) :return: Dashboard If the method is called asynchronously, returns the request thread. """ - all_params = ['dashboard_id', 'str_customer_ids'] # noqa: E501 + all_params = ['body', 'dashboard_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -82,18 +78,21 @@ def add_dashboard_customers_using_post_with_http_info(self, dashboard_id, str_cu 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 add_dashboard_customers_using_post" % key + ) params[key] = val del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `add_dashboard_customers_using_post`") # 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 `add_dashboard_customers_using_post`") # noqa: E501 - # verify the required parameter 'str_customer_ids' is set - if ('str_customer_ids' not in params or - params['str_customer_ids'] is None): - raise ValueError( - "Missing the required parameter `str_customer_ids` when calling `add_dashboard_customers_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `dashboard_id` when calling `add_dashboard_customers_using_post`") # noqa: E501 collection_formats = {} @@ -109,8 +108,8 @@ def add_dashboard_customers_using_post_with_http_info(self, dashboard_id, str_cu local_var_files = {} body_params = None - if 'str_customer_ids' in params: - body_params = params['str_customer_ids'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -143,7 +142,7 @@ def assign_dashboard_to_customer_using_post(self, customer_id, dashboard_id, **k This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_dashboard_to_customer_using_post(customer_id, dashboard_id, async_req=True) + >>> thread = api.assign_dashboard_to_customer_using_post(customer_id, dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -155,11 +154,9 @@ def assign_dashboard_to_customer_using_post(self, customer_id, dashboard_id, **k """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.assign_dashboard_to_customer_using_post_with_http_info(customer_id, dashboard_id, - **kwargs) # noqa: E501 + return self.assign_dashboard_to_customer_using_post_with_http_info(customer_id, dashboard_id, **kwargs) # noqa: E501 else: - (data) = self.assign_dashboard_to_customer_using_post_with_http_info(customer_id, dashboard_id, - **kwargs) # noqa: E501 + (data) = self.assign_dashboard_to_customer_using_post_with_http_info(customer_id, dashboard_id, **kwargs) # noqa: E501 return data def assign_dashboard_to_customer_using_post_with_http_info(self, customer_id, dashboard_id, **kwargs): # noqa: E501 @@ -167,7 +164,7 @@ def assign_dashboard_to_customer_using_post_with_http_info(self, customer_id, da This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_dashboard_to_customer_using_post_with_http_info(customer_id, dashboard_id, async_req=True) + >>> thread = api.assign_dashboard_to_customer_using_post_with_http_info(customer_id, dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -186,18 +183,21 @@ def assign_dashboard_to_customer_using_post_with_http_info(self, customer_id, da 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_dashboard_to_customer_using_post" % 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 `assign_dashboard_to_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `customer_id` when calling `assign_dashboard_to_customer_using_post`") # 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 `assign_dashboard_to_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `dashboard_id` when calling `assign_dashboard_to_customer_using_post`") # noqa: E501 collection_formats = {} @@ -219,10 +219,6 @@ def assign_dashboard_to_customer_using_post_with_http_info(self, customer_id, da header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -242,123 +238,45 @@ def assign_dashboard_to_customer_using_post_with_http_info(self, customer_id, da _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_home_dashboard_using_get(self, **kwargs): - """getHomeDashboard # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_home_dashboard_using_get(async_req=True) - >>> result = thread.get() - - :return: Dashboard - If the method is called asynchronously, - returns the request thread. - """ - - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_home_dashboard_using_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_home_dashboard_using_get_with_http_info(**kwargs) # noqa: E501 - return data - - def get_home_dashboard_using_get_with_http_info(self, **kwargs): - """getHomeDashboard # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_home_dashboard_using_get_with_http_info(async_req=True) - >>> result = thread.get() - - :return: Dashboard - 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']): - 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( - ['*/*']) # 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/dashboard/home', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Dashboard', # 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_home_dashboard_info_using_get(self, **kwargs): - """getHomeDashboardInfo # noqa: E501 + def assign_dashboard_to_edge_using_post(self, edge_id, dashboard_id, **kwargs): # noqa: E501 + """assignDashboardToEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_home_dashboard_info_using_get(async_req=True) + >>> thread = api.assign_dashboard_to_edge_using_post(edge_id, dashboard_id, async_req=True) >>> result = thread.get() + :param async_req bool + :param str edge_id: edgeId (required) + :param str dashboard_id: dashboardId (required) :return: Dashboard If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_home_dashboard_info_using_get_with_http_info(**kwargs) # noqa: E501 + return self.assign_dashboard_to_edge_using_post_with_http_info(edge_id, dashboard_id, **kwargs) # noqa: E501 else: - (data) = self.get_home_dashboard_info_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.assign_dashboard_to_edge_using_post_with_http_info(edge_id, dashboard_id, **kwargs) # noqa: E501 return data - def get_home_dashboard_info_using_get_with_http_info(self, **kwargs): - """getHomeDashboardInfo # noqa: E501 + def assign_dashboard_to_edge_using_post_with_http_info(self, edge_id, dashboard_id, **kwargs): # noqa: E501 + """assignDashboardToEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_home_dashboard_info_using_get_with_http_info(async_req=True) + >>> thread = api.assign_dashboard_to_edge_using_post_with_http_info(edge_id, dashboard_id, async_req=True) >>> result = thread.get() + :param async_req bool + :param str edge_id: edgeId (required) + :param str dashboard_id: dashboardId (required) :return: Dashboard If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['edge_id', 'dashboard_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -366,12 +284,29 @@ def get_home_dashboard_info_using_get_with_http_info(self, **kwargs): 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_dashboard_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 `assign_dashboard_to_edge_using_post`") # 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 `assign_dashboard_to_edge_using_post`") # noqa: E501 collection_formats = {} path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + if 'dashboard_id' in params: + path_params['dashboardId'] = params['dashboard_id'] # noqa: E501 query_params = [] @@ -385,15 +320,11 @@ def get_home_dashboard_info_using_get_with_http_info(self, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/dashboard/home/info', 'GET', + '/api/edge/{edgeId}/dashboard/{dashboardId}', 'POST', path_params, query_params, header_params, @@ -413,7 +344,7 @@ def assign_dashboard_to_public_customer_using_post(self, dashboard_id, **kwargs) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_dashboard_to_public_customer_using_post(dashboard_id, async_req=True) + >>> thread = api.assign_dashboard_to_public_customer_using_post(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -424,11 +355,9 @@ def assign_dashboard_to_public_customer_using_post(self, dashboard_id, **kwargs) """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.assign_dashboard_to_public_customer_using_post_with_http_info(dashboard_id, - **kwargs) # noqa: E501 + return self.assign_dashboard_to_public_customer_using_post_with_http_info(dashboard_id, **kwargs) # noqa: E501 else: - (data) = self.assign_dashboard_to_public_customer_using_post_with_http_info(dashboard_id, - **kwargs) # noqa: E501 + (data) = self.assign_dashboard_to_public_customer_using_post_with_http_info(dashboard_id, **kwargs) # noqa: E501 return data def assign_dashboard_to_public_customer_using_post_with_http_info(self, dashboard_id, **kwargs): # noqa: E501 @@ -436,7 +365,7 @@ def assign_dashboard_to_public_customer_using_post_with_http_info(self, dashboar This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_dashboard_to_public_customer_using_post_with_http_info(dashboard_id, async_req=True) + >>> thread = api.assign_dashboard_to_public_customer_using_post_with_http_info(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -454,13 +383,17 @@ def assign_dashboard_to_public_customer_using_post_with_http_info(self, dashboar 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_dashboard_to_public_customer_using_post" % 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 `assign_dashboard_to_public_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `dashboard_id` when calling `assign_dashboard_to_public_customer_using_post`") # noqa: E501 collection_formats = {} @@ -480,10 +413,6 @@ def assign_dashboard_to_public_customer_using_post_with_http_info(self, dashboar header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -508,7 +437,7 @@ def delete_dashboard_using_delete(self, dashboard_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_dashboard_using_delete(dashboard_id, async_req=True) + >>> thread = api.delete_dashboard_using_delete(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -529,7 +458,7 @@ def delete_dashboard_using_delete_with_http_info(self, dashboard_id, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_dashboard_using_delete_with_http_info(dashboard_id, async_req=True) + >>> thread = api.delete_dashboard_using_delete_with_http_info(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -547,13 +476,17 @@ def delete_dashboard_using_delete_with_http_info(self, dashboard_id, **kwargs): 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_dashboard_using_delete" % 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 `delete_dashboard_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `dashboard_id` when calling `delete_dashboard_using_delete`") # noqa: E501 collection_formats = {} @@ -569,14 +502,6 @@ def delete_dashboard_using_delete_with_http_info(self, dashboard_id, **kwargs): local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -601,27 +526,26 @@ def get_customer_dashboards_using_get(self, customer_id, page_size, page, **kwar This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_dashboards_using_get(customer_id, page_size, page, 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: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param bool mobile: mobile :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TimePageDataDashboardInfo + :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 + 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 + (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 @@ -629,22 +553,23 @@ def get_customer_dashboards_using_get_with_http_info(self, customer_id, page_siz This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_dashboards_using_get_with_http_info(customer_id, page_size, page, 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: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param bool mobile: mobile :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TimePageDataDashboardInfo + :return: PageDataDashboardInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['customer_id', 'text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501 + all_params = ['customer_id', 'page_size', 'page', 'mobile', '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') @@ -652,23 +577,25 @@ def get_customer_dashboards_using_get_with_http_info(self, customer_id, page_siz 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 + 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 + 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 + raise ValueError("Missing the required parameter `page` when calling `get_customer_dashboards_using_get`") # noqa: E501 collection_formats = {} @@ -677,6 +604,8 @@ def get_customer_dashboards_using_get_with_http_info(self, customer_id, page_siz path_params['customerId'] = params['customer_id'] # noqa: E501 query_params = [] + if 'mobile' in params: + query_params.append(('mobile', params['mobile'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: @@ -698,22 +627,18 @@ def get_customer_dashboards_using_get_with_http_info(self, customer_id, page_siz header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/customer/{customerId}/dashboards{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/customer/{customerId}/dashboards{?mobile,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TimePageDataDashboardInfo', # noqa: E501 + 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'), @@ -726,7 +651,7 @@ def get_dashboard_by_id_using_get(self, dashboard_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_dashboard_by_id_using_get(dashboard_id, async_req=True) + >>> thread = api.get_dashboard_by_id_using_get(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -747,7 +672,7 @@ def get_dashboard_by_id_using_get_with_http_info(self, dashboard_id, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_dashboard_by_id_using_get_with_http_info(dashboard_id, async_req=True) + >>> thread = api.get_dashboard_by_id_using_get_with_http_info(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -765,13 +690,17 @@ def get_dashboard_by_id_using_get_with_http_info(self, dashboard_id, **kwargs): 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_dashboard_by_id_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 `get_dashboard_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `dashboard_id` when calling `get_dashboard_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -791,10 +720,6 @@ def get_dashboard_by_id_using_get_with_http_info(self, dashboard_id, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -819,7 +744,7 @@ def get_dashboard_info_by_id_using_get(self, dashboard_id, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_dashboard_info_by_id_using_get(dashboard_id, async_req=True) + >>> thread = api.get_dashboard_info_by_id_using_get(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -840,7 +765,7 @@ def get_dashboard_info_by_id_using_get_with_http_info(self, dashboard_id, **kwar This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_dashboard_info_by_id_using_get_with_http_info(dashboard_id, async_req=True) + >>> thread = api.get_dashboard_info_by_id_using_get_with_http_info(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -858,13 +783,17 @@ def get_dashboard_info_by_id_using_get_with_http_info(self, dashboard_id, **kwar 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_dashboard_info_by_id_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 `get_dashboard_info_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `dashboard_id` when calling `get_dashboard_info_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -884,10 +813,6 @@ def get_dashboard_info_by_id_using_get_with_http_info(self, dashboard_id, **kwar header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -907,41 +832,57 @@ def get_dashboard_info_by_id_using_get_with_http_info(self, dashboard_id, **kwar _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_max_datapoints_limit_using_get(self, **kwargs): # noqa: E501 - """getMaxDatapointsLimit # noqa: E501 + def get_edge_dashboards_using_get(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """getEdgeDashboards # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_max_datapoints_limit_using_get(async_req=True) + >>> thread = api.get_edge_dashboards_using_get(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :return: int + :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :param int start_time: startTime + :param int end_time: endTime + :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_max_datapoints_limit_using_get_with_http_info(**kwargs) # noqa: E501 + return self.get_edge_dashboards_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_max_datapoints_limit_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_edge_dashboards_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 return data - def get_max_datapoints_limit_using_get_with_http_info(self, **kwargs): # noqa: E501 - """getMaxDatapointsLimit # noqa: E501 + def get_edge_dashboards_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """getEdgeDashboards # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_max_datapoints_limit_using_get_with_http_info(async_req=True) + >>> thread = api.get_edge_dashboards_using_get_with_http_info(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :return: int + :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :param int start_time: startTime + :param int end_time: endTime + :return: PageDataDashboardInfo If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['edge_id', 'page_size', 'page', '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') @@ -949,14 +890,47 @@ def get_max_datapoints_limit_using_get_with_http_info(self, **kwargs): # noqa: 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_dashboards_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_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_edge_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_edge_dashboards_using_get`") # noqa: E501 collection_formats = {} path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 query_params = [] + 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 + 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 = {} @@ -968,22 +942,18 @@ def get_max_datapoints_limit_using_get_with_http_info(self, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/dashboard/maxDatapointsLimit', 'GET', + '/api/edge/{edgeId}/dashboards{?textSearch,sortProperty,sortOrder,startTime,endTime,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='int', # noqa: E501 + 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'), @@ -991,36 +961,36 @@ def get_max_datapoints_limit_using_get_with_http_info(self, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_server_time_using_get(self, **kwargs): # noqa: E501 - """getServerTime # noqa: E501 + def get_home_dashboard_info_using_get(self, **kwargs): # noqa: E501 + """getHomeDashboardInfo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_server_time_using_get(async_req=True) + >>> thread = api.get_home_dashboard_info_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :return: int + :return: HomeDashboardInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_server_time_using_get_with_http_info(**kwargs) # noqa: E501 + return self.get_home_dashboard_info_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_server_time_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_home_dashboard_info_using_get_with_http_info(**kwargs) # noqa: E501 return data - def get_server_time_using_get_with_http_info(self, **kwargs): # noqa: E501 - """getServerTime # noqa: E501 + def get_home_dashboard_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getHomeDashboardInfo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_server_time_using_get_with_http_info(async_req=True) + >>> thread = api.get_home_dashboard_info_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :return: int + :return: HomeDashboardInfo If the method is called asynchronously, returns the request thread. """ @@ -1033,6 +1003,11 @@ def get_server_time_using_get_with_http_info(self, **kwargs): # noqa: E501 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_home_dashboard_info_using_get" % key + ) params[key] = val del params['kwargs'] @@ -1052,22 +1027,18 @@ def get_server_time_using_get_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/dashboard/serverTime', 'GET', + '/api/dashboard/home/info', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='int', # noqa: E501 + response_type='HomeDashboardInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1075,46 +1046,41 @@ def get_server_time_using_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def set_tenant_home_dashboard_info_using_post(self, home_dashboard_info, **kwargs): - """setTenantHomeDashboardInfo # noqa: E501 + def get_home_dashboard_using_get(self, **kwargs): # noqa: E501 + """getHomeDashboard # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.set_tenant_home_dashboard_info_using_post(home_dashboard_info, async_req=True) + >>> thread = api.get_home_dashboard_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param home_dashboard_info: homeDashboardInfo - :return: None + :return: HomeDashboard If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.set_tenant_home_dashboard_info_using_post_with_http_info(home_dashboard_info, - **kwargs) # noqa: E501 + return self.get_home_dashboard_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.set_tenant_home_dashboard_info_using_post_with_http_info(home_dashboard_info, - **kwargs) # noqa: E501 + (data) = self.get_home_dashboard_using_get_with_http_info(**kwargs) # noqa: E501 return data - def set_tenant_home_dashboard_info_using_post_with_http_info(self, home_dashboard_info, **kwargs): - """setTenantHomeDashboardInfo # noqa: E501 + def get_home_dashboard_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getHomeDashboard # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.set_tenant_home_dashboard_info_using_post_with_http_info(home_dashboard_info, async_req=True) + >>> thread = api.get_home_dashboard_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param home_dashboard_info: homeDashboardInfo - :return: None + :return: HomeDashboard If the method is called asynchronously, returns the request thread. """ - all_params = ['home_dashboard_info'] # noqa: E501 + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1122,13 +1088,13 @@ def set_tenant_home_dashboard_info_using_post_with_http_info(self, home_dashboar 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_home_dashboard_using_get" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'dashboard' is set - if ('home_dashboard_info' not in params or - params['home_dashboard_info'] is None): - raise ValueError( - "Missing the required parameter `home_dashboard_info` when calling `set_tenant_home_dashboard_info_using_post`") # noqa: E501 collection_formats = {} @@ -1142,28 +1108,22 @@ def set_tenant_home_dashboard_info_using_post_with_http_info(self, home_dashboar local_var_files = {} body_params = None - if 'home_dashboard_info' in params: - body_params = params['home_dashboard_info'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/dashboard/home/info', 'POST', + '/api/dashboard/home', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Dashboard', # noqa: E501 + response_type='HomeDashboard', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1171,51 +1131,41 @@ def set_tenant_home_dashboard_info_using_post_with_http_info(self, home_dashboar _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_dashboards_using_get(self, page_size, page, **kwargs): # noqa: E501 - """getTenantDashboards # noqa: E501 + def get_max_datapoints_limit_using_get(self, **kwargs): # noqa: E501 + """getMaxDatapointsLimit # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_dashboards_using_get(page_size, page, async_req=True) + >>> thread = api.get_max_datapoints_limit_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDashboardInfo + :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.get_tenant_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.get_max_datapoints_limit_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_tenant_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.get_max_datapoints_limit_using_get_with_http_info(**kwargs) # noqa: E501 return data - def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """getTenantDashboards # noqa: E501 + def get_max_datapoints_limit_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getMaxDatapointsLimit # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_dashboards_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_max_datapoints_limit_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDashboardInfo + :return: int If the method is called asynchronously, returns the request thread. """ - all_params = ['text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501 + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1223,34 +1173,19 @@ def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwar 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_max_datapoints_limit_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_tenant_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_tenant_dashboards_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - 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 '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 = {} @@ -1262,22 +1197,103 @@ def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwar header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/dashboard/maxDatapointsLimit', 'GET', + 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 get_server_time_using_get(self, **kwargs): # noqa: E501 + """getServerTime # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_server_time_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :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.get_server_time_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_server_time_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_server_time_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getServerTime # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_server_time_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: int + 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_server_time_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( + ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/tenant/dashboards{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/dashboard/serverTime', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataDashboardInfo', # noqa: E501 + 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'), @@ -1285,56 +1301,53 @@ def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwar _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_dashboards_using_get1(self, tenant_id, page_size, page, **kwargs): # noqa: E501 + def get_tenant_dashboards_using_get(self, page_size, page, **kwargs): # noqa: E501 """getTenantDashboards # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_dashboards_using_get1(tenant_id, page_size, page, async_req=True) + >>> thread = api.get_tenant_dashboards_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_id: tenantId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param bool mobile: mobile :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDashboardInfo + :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_tenant_dashboards_using_get1_with_http_info(tenant_id, page_size, page, - **kwargs) # noqa: E501 + return self.get_tenant_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_tenant_dashboards_using_get1_with_http_info(tenant_id, page_size, page, - **kwargs) # noqa: E501 + (data) = self.get_tenant_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, page, **kwargs): # noqa: E501 + def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 """getTenantDashboards # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_dashboards_using_get1_with_http_info(tenant_id, page_size, page, async_req=True) + >>> thread = api.get_tenant_dashboards_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_id: tenantId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param bool mobile: mobile :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDashboardInfo + :return: PageDataDashboardInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['tenant_id', 'text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501 + all_params = ['page_size', 'page', 'mobile', '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') @@ -1342,31 +1355,29 @@ def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, 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_dashboards_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_dashboards_using_get1`") # 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_dashboards_using_get1`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_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_tenant_dashboards_using_get1`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_tenant_dashboards_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'tenant_id' in params: - path_params['tenantId'] = params['tenant_id'] # noqa: E501 query_params = [] + if 'mobile' in params: + query_params.append(('mobile', params['mobile'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: @@ -1388,22 +1399,18 @@ def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/{tenantId}/dashboards{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/tenant/dashboards{?mobile,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataDashboardInfo', # noqa: E501 + 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'), @@ -1411,61 +1418,53 @@ def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_edge_dashboards_using_get(self, edge_id, page_size, page, **kwargs): - """getEdgeDashboards # noqa: E501 + def get_tenant_dashboards_using_get1(self, tenant_id, page_size, page, **kwargs): # noqa: E501 + """getTenantDashboards # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_edge_dashboards_using_get(edge_id, page_size, page, async_req=True) + >>> thread = api.get_tenant_dashboards_using_get1(tenant_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) + :param str tenant_id: tenantId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str start_time: startTime - :param str end_time: endTime - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDashboardInfo + :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_edge_dashboards_using_get_with_http_info(edge_id, page_size, page, - **kwargs) # noqa: E501 + return self.get_tenant_dashboards_using_get1_with_http_info(tenant_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_edge_dashboards_using_get_with_http_info(edge_id, page_size, page, - **kwargs) # noqa: E501 + (data) = self.get_tenant_dashboards_using_get1_with_http_info(tenant_id, page_size, page, **kwargs) # noqa: E501 return data - def get_edge_dashboards_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): - """getEdgeDashboards # noqa: E501 + def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, page, **kwargs): # noqa: E501 + """getTenantDashboards # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_edge_dashboards_using_get_with_http_info(edge_id, page_size, page, async_req=True) + >>> thread = api.get_tenant_dashboards_using_get1_with_http_info(tenant_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) + :param str tenant_id: tenantId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str start_time: startTime - :param str end_time: endTime - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDashboardInfo + :return: PageDataDashboardInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'page_size', - 'page'] # noqa: E501 + 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') @@ -1473,29 +1472,31 @@ def get_edge_dashboards_using_get_with_http_info(self, edge_id, page_size, page, 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_dashboards_using_get1" % 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_dashboards_using_get`") # noqa: E501 + # 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_dashboards_using_get1`") # 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_dashboards_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_dashboards_using_get1`") # 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_dashboards_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_tenant_dashboards_using_get1`") # noqa: E501 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 + if 'tenant_id' in params: + path_params['tenantId'] = params['tenant_id'] # noqa: E501 query_params = [] if 'text_search' in params: @@ -1504,10 +1505,6 @@ def get_edge_dashboards_using_get_with_http_info(self, edge_id, page_size, page, 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 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: @@ -1523,22 +1520,18 @@ def get_edge_dashboards_using_get_with_http_info(self, edge_id, page_size, page, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/{edgeId}/dashboards{?textSearch,sortProperty,sortOrder,startTime,endTime,pageSize,page}', 'GET', + '/api/tenant/{tenantId}/dashboards{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataDashboardInfo', # noqa: E501 + 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'), @@ -1546,19 +1539,19 @@ def get_edge_dashboards_using_get_with_http_info(self, edge_id, page_size, page, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_home_dashboard_info_using_get(self, **kwargs): + def get_tenant_home_dashboard_info_using_get(self, **kwargs): # noqa: E501 """getTenantHomeDashboardInfo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_home_dashboard_info_using_get(async_req=True) + >>> thread = api.get_tenant_home_dashboard_info_using_get(async_req=True) >>> result = thread.get() - :return: Dashboard + :param async_req bool + :return: HomeDashboardInfo 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_home_dashboard_info_using_get_with_http_info(**kwargs) # noqa: E501 @@ -1566,15 +1559,16 @@ def get_tenant_home_dashboard_info_using_get(self, **kwargs): (data) = self.get_tenant_home_dashboard_info_using_get_with_http_info(**kwargs) # noqa: E501 return data - def get_tenant_home_dashboard_info_using_get_with_http_info(self, **kwargs): + def get_tenant_home_dashboard_info_using_get_with_http_info(self, **kwargs): # noqa: E501 """getTenantHomeDashboardInfo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_home_dashboard_info_using_get_with_http_info(async_req=True) + >>> thread = api.get_tenant_home_dashboard_info_using_get_with_http_info(async_req=True) >>> result = thread.get() - :return: Dashboard + :param async_req bool + :return: HomeDashboardInfo If the method is called asynchronously, returns the request thread. """ @@ -1587,6 +1581,11 @@ def get_tenant_home_dashboard_info_using_get_with_http_info(self, **kwargs): 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_home_dashboard_info_using_get" % key + ) params[key] = val del params['kwargs'] @@ -1606,10 +1605,6 @@ def get_tenant_home_dashboard_info_using_get_with_http_info(self, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1621,7 +1616,7 @@ def get_tenant_home_dashboard_info_using_get_with_http_info(self, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='Dashboard', # noqa: E501 + response_type='HomeDashboardInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1629,48 +1624,45 @@ def get_tenant_home_dashboard_info_using_get_with_http_info(self, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def unassign_dashboard_from_edge_using_delete(self, edge_id, dashboard_id, **kwargs): - """unassignDashboardFromEdge # noqa: E501 + def remove_dashboard_customers_using_post(self, body, dashboard_id, **kwargs): # noqa: E501 + """removeDashboardCustomers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_dashboard_from_edge_using_delete(edge_id, dashboard_id, async_req=True) + >>> thread = api.remove_dashboard_customers_using_post(body, dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) + :param list[str] body: strCustomerIds (required) :param str dashboard_id: dashboardId (required) - :return: None + :return: Dashboard If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.unassign_dashboard_from_edge_using_delete_with_http_info(edge_id, dashboard_id, - **kwargs) # noqa: E501 + return self.remove_dashboard_customers_using_post_with_http_info(body, dashboard_id, **kwargs) # noqa: E501 else: - (data) = self.unassign_dashboard_from_edge_using_delete_with_http_info(edge_id, dashboard_id, - **kwargs) # noqa: E501 + (data) = self.remove_dashboard_customers_using_post_with_http_info(body, dashboard_id, **kwargs) # noqa: E501 return data - def unassign_dashboard_from_edge_using_delete_with_http_info(self, edge_id, dashboard_id, **kwargs): - """unassignDashboardFromEdge # noqa: E501 + def remove_dashboard_customers_using_post_with_http_info(self, body, dashboard_id, **kwargs): # noqa: E501 + """removeDashboardCustomers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_dashboard_from_edge_using_delete_with_http_info(edge_id, dashboard_id, async_req=True) + >>> thread = api.remove_dashboard_customers_using_post_with_http_info(body, dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str dashboard_id: dashboardId - :return: None + :param list[str] body: strCustomerIds (required) + :param str dashboard_id: dashboardId (required) + :return: Dashboard If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'dashboard_id'] # noqa: E501 + all_params = ['body', 'dashboard_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1678,24 +1670,25 @@ def unassign_dashboard_from_edge_using_delete_with_http_info(self, edge_id, dash 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 remove_dashboard_customers_using_post" % key + ) params[key] = val del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `remove_dashboard_customers_using_post`") # noqa: E501 # verify the required parameter 'dashboard_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_dashboard_from_edge_using_delete`") # noqa: E501 - # verify the required parameter 'str_customer_ids' is set if ('dashboard_id' not in params or params['dashboard_id'] is None): - raise ValueError( - "Missing the required parameter `dashboard_id` when calling `unassign_dashboard_from_edge_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `dashboard_id` when calling `remove_dashboard_customers_using_post`") # noqa: E501 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 if 'dashboard_id' in params: path_params['dashboardId'] = params['dashboard_id'] # noqa: E501 @@ -1707,6 +1700,8 @@ def unassign_dashboard_from_edge_using_delete_with_http_info(self, edge_id, dash 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( ['*/*']) # noqa: E501 @@ -1719,14 +1714,14 @@ def unassign_dashboard_from_edge_using_delete_with_http_info(self, edge_id, dash auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/{edgeId}/dashboard/{dashboardId}', 'DELETE', + '/api/dashboard/{dashboardId}/customers/remove', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='Dashboard', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1734,48 +1729,43 @@ def unassign_dashboard_from_edge_using_delete_with_http_info(self, edge_id, dash _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def assign_dashboard_to_edge_using_post(self, edge_id, dashboard_id, **kwargs): - """assignDashboardToEdge # noqa: E501 + def save_dashboard_using_post(self, body, **kwargs): # noqa: E501 + """saveDashboard # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_dashboard_to_edge_using_post(edge_id, dashboard_id, async_req=True) + >>> thread = api.save_dashboard_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str dashboard_id: dashboardId (required) + :param Dashboard body: dashboard (required) :return: Dashboard If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.assign_dashboard_to_edge_using_post_with_http_info(edge_id, dashboard_id, - **kwargs) # noqa: E501 + return self.save_dashboard_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.assign_dashboard_to_edge_using_post_with_http_info(edge_id, dashboard_id, - **kwargs) # noqa: E501 + (data) = self.save_dashboard_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def assign_dashboard_to_edge_using_post_with_http_info(self, edge_id, dashboard_id, **kwargs): - """assignDashboardToEdge # noqa: E501 + def save_dashboard_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveDashboard # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_dashboard_to_edge_using_post_with_http_info(edge_id, dashboard_id, async_req=True) + >>> thread = api.save_dashboard_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str dashboard_id: dashboardId + :param Dashboard body: dashboard (required) :return: Dashboard If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'dashboard_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') @@ -1783,26 +1773,21 @@ def assign_dashboard_to_edge_using_post_with_http_info(self, edge_id, dashboard_ 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_dashboard_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'dashboard_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_dashboard_to_edge_using_post_with_http_info`") # noqa: E501 - # verify the required parameter 'str_customer_ids' is set - if ('dashboard_id' not in params or - params['dashboard_id'] is None): - raise ValueError( - "Missing the required parameter `dashboard_id` when calling `assign_dashboard_to_edge_using_post_with_http_info`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_dashboard_using_post`") # noqa: E501 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 - if 'dashboard_id' in params: - path_params['dashboardId'] = params['dashboard_id'] # noqa: E501 query_params = [] @@ -1812,6 +1797,8 @@ def assign_dashboard_to_edge_using_post_with_http_info(self, edge_id, dashboard_ 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( ['*/*']) # noqa: E501 @@ -1824,7 +1811,7 @@ def assign_dashboard_to_edge_using_post_with_http_info(self, edge_id, dashboard_ auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/{edgeId}/dashboard/{dashboardId}', 'POST', + '/api/dashboard', 'POST', path_params, query_params, header_params, @@ -1839,49 +1826,43 @@ def assign_dashboard_to_edge_using_post_with_http_info(self, edge_id, dashboard_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def remove_dashboard_customers_using_post(self, dashboard_id, str_customer_ids, **kwargs): # noqa: E501 - """removeDashboardCustomers # noqa: E501 + def set_tenant_home_dashboard_info_using_post(self, body, **kwargs): # noqa: E501 + """setTenantHomeDashboardInfo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.remove_dashboard_customers_using_post(dashboard_id, str_customer_ids, async_req=True) + >>> thread = api.set_tenant_home_dashboard_info_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str dashboard_id: dashboardId (required) - :param list[str] str_customer_ids: strCustomerIds (required) - :return: Dashboard + :param HomeDashboardInfo body: homeDashboardInfo (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.remove_dashboard_customers_using_post_with_http_info(dashboard_id, str_customer_ids, - **kwargs) # noqa: E501 + return self.set_tenant_home_dashboard_info_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.remove_dashboard_customers_using_post_with_http_info(dashboard_id, str_customer_ids, - **kwargs) # noqa: E501 + (data) = self.set_tenant_home_dashboard_info_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def remove_dashboard_customers_using_post_with_http_info(self, dashboard_id, str_customer_ids, - **kwargs): # noqa: E501 - """removeDashboardCustomers # noqa: E501 + def set_tenant_home_dashboard_info_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """setTenantHomeDashboardInfo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.remove_dashboard_customers_using_post_with_http_info(dashboard_id, str_customer_ids, async_req=True) + >>> thread = api.set_tenant_home_dashboard_info_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str dashboard_id: dashboardId (required) - :param list[str] str_customer_ids: strCustomerIds (required) - :return: Dashboard + :param HomeDashboardInfo body: homeDashboardInfo (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['dashboard_id', 'str_customer_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') @@ -1889,24 +1870,21 @@ def remove_dashboard_customers_using_post_with_http_info(self, dashboard_id, str 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_tenant_home_dashboard_info_using_post" % 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 `remove_dashboard_customers_using_post`") # noqa: E501 - # verify the required parameter 'str_customer_ids' is set - if ('str_customer_ids' not in params or - params['str_customer_ids'] is None): - raise ValueError( - "Missing the required parameter `str_customer_ids` when calling `remove_dashboard_customers_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `set_tenant_home_dashboard_info_using_post`") # noqa: E501 collection_formats = {} path_params = {} - if 'dashboard_id' in params: - path_params['dashboardId'] = params['dashboard_id'] # noqa: E501 query_params = [] @@ -1916,12 +1894,8 @@ def remove_dashboard_customers_using_post_with_http_info(self, dashboard_id, str local_var_files = {} body_params = None - if 'str_customer_ids' in params: - body_params = params['str_customer_ids'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -1930,14 +1904,14 @@ def remove_dashboard_customers_using_post_with_http_info(self, dashboard_id, str auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/dashboard/{dashboardId}/customers/remove', 'POST', + '/api/tenant/dashboard/home/info', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Dashboard', # 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'), @@ -1945,43 +1919,45 @@ def remove_dashboard_customers_using_post_with_http_info(self, dashboard_id, str _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_dashboard_using_post(self, dashboard, **kwargs): # noqa: E501 - """saveDashboard # noqa: E501 + def unassign_dashboard_from_customer_using_delete(self, customer_id, dashboard_id, **kwargs): # noqa: E501 + """unassignDashboardFromCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_dashboard_using_post(dashboard, async_req=True) + >>> thread = api.unassign_dashboard_from_customer_using_delete(customer_id, dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool - :param Dashboard dashboard: dashboard (required) + :param str customer_id: customerId (required) + :param str dashboard_id: dashboardId (required) :return: Dashboard If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_dashboard_using_post_with_http_info(dashboard, **kwargs) # noqa: E501 + return self.unassign_dashboard_from_customer_using_delete_with_http_info(customer_id, dashboard_id, **kwargs) # noqa: E501 else: - (data) = self.save_dashboard_using_post_with_http_info(dashboard, **kwargs) # noqa: E501 + (data) = self.unassign_dashboard_from_customer_using_delete_with_http_info(customer_id, dashboard_id, **kwargs) # noqa: E501 return data - def save_dashboard_using_post_with_http_info(self, dashboard, **kwargs): # noqa: E501 - """saveDashboard # noqa: E501 + def unassign_dashboard_from_customer_using_delete_with_http_info(self, customer_id, dashboard_id, **kwargs): # noqa: E501 + """unassignDashboardFromCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_dashboard_using_post_with_http_info(dashboard, async_req=True) + >>> thread = api.unassign_dashboard_from_customer_using_delete_with_http_info(customer_id, dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool - :param Dashboard dashboard: dashboard (required) + :param str customer_id: customerId (required) + :param str dashboard_id: dashboardId (required) :return: Dashboard If the method is called asynchronously, returns the request thread. """ - all_params = ['dashboard'] # noqa: E501 + all_params = ['customer_id', 'dashboard_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1989,17 +1965,29 @@ def save_dashboard_using_post_with_http_info(self, dashboard, **kwargs): # noqa 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_dashboard_from_customer_using_delete" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'dashboard' is set - if ('dashboard' not in params or - params['dashboard'] is None): - raise ValueError( - "Missing the required parameter `dashboard` when calling `save_dashboard_using_post`") # noqa: E501 + # 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 `unassign_dashboard_from_customer_using_delete`") # 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 `unassign_dashboard_from_customer_using_delete`") # noqa: E501 collection_formats = {} path_params = {} + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 + if 'dashboard_id' in params: + path_params['dashboardId'] = params['dashboard_id'] # noqa: E501 query_params = [] @@ -2009,21 +1997,15 @@ def save_dashboard_using_post_with_http_info(self, dashboard, **kwargs): # noqa local_var_files = {} body_params = None - if 'dashboard' in params: - body_params = params['dashboard'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/dashboard', 'POST', + '/api/customer/{customerId}/dashboard/{dashboardId}', 'DELETE', path_params, query_params, header_params, @@ -2038,16 +2020,16 @@ def save_dashboard_using_post_with_http_info(self, dashboard, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def unassign_dashboard_from_customer_using_delete(self, customer_id, dashboard_id, **kwargs): # noqa: E501 - """unassignDashboardFromCustomer # noqa: E501 + def unassign_dashboard_from_edge_using_delete(self, edge_id, dashboard_id, **kwargs): # noqa: E501 + """unassignDashboardFromEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_dashboard_from_customer_using_delete(customer_id, dashboard_id, async_req=True) + >>> thread = api.unassign_dashboard_from_edge_using_delete(edge_id, dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str customer_id: customerId (required) + :param str edge_id: edgeId (required) :param str dashboard_id: dashboardId (required) :return: Dashboard If the method is called asynchronously, @@ -2055,31 +2037,28 @@ def unassign_dashboard_from_customer_using_delete(self, customer_id, dashboard_i """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.unassign_dashboard_from_customer_using_delete_with_http_info(customer_id, dashboard_id, - **kwargs) # noqa: E501 + return self.unassign_dashboard_from_edge_using_delete_with_http_info(edge_id, dashboard_id, **kwargs) # noqa: E501 else: - (data) = self.unassign_dashboard_from_customer_using_delete_with_http_info(customer_id, dashboard_id, - **kwargs) # noqa: E501 + (data) = self.unassign_dashboard_from_edge_using_delete_with_http_info(edge_id, dashboard_id, **kwargs) # noqa: E501 return data - def unassign_dashboard_from_customer_using_delete_with_http_info(self, customer_id, dashboard_id, - **kwargs): # noqa: E501 - """unassignDashboardFromCustomer # noqa: E501 + def unassign_dashboard_from_edge_using_delete_with_http_info(self, edge_id, dashboard_id, **kwargs): # noqa: E501 + """unassignDashboardFromEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_dashboard_from_customer_using_delete_with_http_info(customer_id, dashboard_id, async_req=True) + >>> thread = api.unassign_dashboard_from_edge_using_delete_with_http_info(edge_id, dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str customer_id: customerId (required) + :param str edge_id: edgeId (required) :param str dashboard_id: dashboardId (required) :return: Dashboard If the method is called asynchronously, returns the request thread. """ - all_params = ['customer_id', 'dashboard_id'] # noqa: E501 + all_params = ['edge_id', 'dashboard_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2087,24 +2066,27 @@ def unassign_dashboard_from_customer_using_delete_with_http_info(self, customer_ 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_dashboard_from_edge_using_delete" % 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 `unassign_dashboard_from_customer_using_delete`") # 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 `unassign_dashboard_from_edge_using_delete`") # 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 `unassign_dashboard_from_customer_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `dashboard_id` when calling `unassign_dashboard_from_edge_using_delete`") # noqa: E501 collection_formats = {} path_params = {} - if 'customer_id' in params: - path_params['customerId'] = params['customer_id'] # noqa: E501 + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 if 'dashboard_id' in params: path_params['dashboardId'] = params['dashboard_id'] # noqa: E501 @@ -2120,15 +2102,11 @@ def unassign_dashboard_from_customer_using_delete_with_http_info(self, customer_ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/customer/{customerId}/dashboard/{dashboardId}', 'DELETE', + '/api/edge/{edgeId}/dashboard/{dashboardId}', 'DELETE', path_params, query_params, header_params, @@ -2148,7 +2126,7 @@ def unassign_dashboard_from_public_customer_using_delete(self, dashboard_id, **k This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_dashboard_from_public_customer_using_delete(dashboard_id, async_req=True) + >>> thread = api.unassign_dashboard_from_public_customer_using_delete(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -2159,11 +2137,9 @@ def unassign_dashboard_from_public_customer_using_delete(self, dashboard_id, **k """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.unassign_dashboard_from_public_customer_using_delete_with_http_info(dashboard_id, - **kwargs) # noqa: E501 + return self.unassign_dashboard_from_public_customer_using_delete_with_http_info(dashboard_id, **kwargs) # noqa: E501 else: - (data) = self.unassign_dashboard_from_public_customer_using_delete_with_http_info(dashboard_id, - **kwargs) # noqa: E501 + (data) = self.unassign_dashboard_from_public_customer_using_delete_with_http_info(dashboard_id, **kwargs) # noqa: E501 return data def unassign_dashboard_from_public_customer_using_delete_with_http_info(self, dashboard_id, **kwargs): # noqa: E501 @@ -2171,7 +2147,7 @@ def unassign_dashboard_from_public_customer_using_delete_with_http_info(self, da This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_dashboard_from_public_customer_using_delete_with_http_info(dashboard_id, async_req=True) + >>> thread = api.unassign_dashboard_from_public_customer_using_delete_with_http_info(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -2189,13 +2165,17 @@ def unassign_dashboard_from_public_customer_using_delete_with_http_info(self, da 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_dashboard_from_public_customer_using_delete" % 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 `unassign_dashboard_from_public_customer_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `dashboard_id` when calling `unassign_dashboard_from_public_customer_using_delete`") # noqa: E501 collection_formats = {} @@ -2215,10 +2195,6 @@ def unassign_dashboard_from_public_customer_using_delete_with_http_info(self, da header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -2238,48 +2214,45 @@ def unassign_dashboard_from_public_customer_using_delete_with_http_info(self, da _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def update_dashboard_customers_using_post(self, dashboard_id, str_customer_ids, **kwargs): # noqa: E501 + def update_dashboard_customers_using_post(self, dashboard_id, **kwargs): # noqa: E501 """updateDashboardCustomers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.update_dashboard_customers_using_post(dashboard_id, str_customer_ids, async_req=True) + >>> thread = api.update_dashboard_customers_using_post(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool :param str dashboard_id: dashboardId (required) - :param list[str] str_customer_ids: strCustomerIds (required) + :param list[str] body: strCustomerIds :return: Dashboard If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.update_dashboard_customers_using_post_with_http_info(dashboard_id, str_customer_ids, - **kwargs) # noqa: E501 + return self.update_dashboard_customers_using_post_with_http_info(dashboard_id, **kwargs) # noqa: E501 else: - (data) = self.update_dashboard_customers_using_post_with_http_info(dashboard_id, str_customer_ids, - **kwargs) # noqa: E501 + (data) = self.update_dashboard_customers_using_post_with_http_info(dashboard_id, **kwargs) # noqa: E501 return data - def update_dashboard_customers_using_post_with_http_info(self, dashboard_id, str_customer_ids, - **kwargs): # noqa: E501 + def update_dashboard_customers_using_post_with_http_info(self, dashboard_id, **kwargs): # noqa: E501 """updateDashboardCustomers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.update_dashboard_customers_using_post_with_http_info(dashboard_id, str_customer_ids, async_req=True) + >>> thread = api.update_dashboard_customers_using_post_with_http_info(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool :param str dashboard_id: dashboardId (required) - :param list[str] str_customer_ids: strCustomerIds (required) + :param list[str] body: strCustomerIds :return: Dashboard If the method is called asynchronously, returns the request thread. """ - all_params = ['dashboard_id', 'str_customer_ids'] # noqa: E501 + all_params = ['dashboard_id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2287,18 +2260,17 @@ def update_dashboard_customers_using_post_with_http_info(self, dashboard_id, str 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_dashboard_customers_using_post" % 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 `update_dashboard_customers_using_post`") # noqa: E501 - # verify the required parameter 'str_customer_ids' is set - if ('str_customer_ids' not in params or - params['str_customer_ids'] is None): - raise ValueError( - "Missing the required parameter `str_customer_ids` when calling `update_dashboard_customers_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `dashboard_id` when calling `update_dashboard_customers_using_post`") # noqa: E501 collection_formats = {} @@ -2314,8 +2286,8 @@ def update_dashboard_customers_using_post_with_http_info(self, dashboard_id, str local_var_files = {} body_params = None - if 'str_customer_ids' in params: - body_params = params['str_customer_ids'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 ae96f43e..759c6827 100644 --- a/tb_rest_client/api/api_ce/device_controller_api.py +++ b/tb_rest_client/api/api_ce/device_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class DeviceControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def assign_device_to_customer_using_post(self, customer_id, device_id, **kwargs) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_device_to_customer_using_post(customer_id, device_id, async_req=True) + >>> thread = api.assign_device_to_customer_using_post(customer_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -51,11 +49,9 @@ def assign_device_to_customer_using_post(self, customer_id, device_id, **kwargs) """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.assign_device_to_customer_using_post_with_http_info(customer_id, device_id, - **kwargs) # noqa: E501 + return self.assign_device_to_customer_using_post_with_http_info(customer_id, device_id, **kwargs) # noqa: E501 else: - (data) = self.assign_device_to_customer_using_post_with_http_info(customer_id, device_id, - **kwargs) # noqa: E501 + (data) = self.assign_device_to_customer_using_post_with_http_info(customer_id, device_id, **kwargs) # noqa: E501 return data def assign_device_to_customer_using_post_with_http_info(self, customer_id, device_id, **kwargs): # noqa: E501 @@ -63,7 +59,7 @@ def assign_device_to_customer_using_post_with_http_info(self, customer_id, devic This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_device_to_customer_using_post_with_http_info(customer_id, device_id, async_req=True) + >>> thread = api.assign_device_to_customer_using_post_with_http_info(customer_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -82,18 +78,21 @@ def assign_device_to_customer_using_post_with_http_info(self, customer_id, devic 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_device_to_customer_using_post" % 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 `assign_device_to_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `customer_id` when calling `assign_device_to_customer_using_post`") # noqa: E501 # 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 `assign_device_to_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `device_id` when calling `assign_device_to_customer_using_post`") # noqa: E501 collection_formats = {} @@ -115,10 +114,6 @@ def assign_device_to_customer_using_post_with_http_info(self, customer_id, devic header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -138,12 +133,12 @@ def assign_device_to_customer_using_post_with_http_info(self, customer_id, devic _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def assign_device_to_edge_using_post(self, edge_id, device_id, **kwargs): + def assign_device_to_edge_using_post(self, edge_id, device_id, **kwargs): # noqa: E501 """assignDeviceToEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_device_to_edge_using_post(edge_id, device_id, async_req=True) + >>> thread = api.assign_device_to_edge_using_post(edge_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -153,22 +148,19 @@ def assign_device_to_edge_using_post(self, edge_id, device_id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.assign_device_to_edge_using_post_with_http_info(edge_id, device_id, - **kwargs) # noqa: E501 + return self.assign_device_to_edge_using_post_with_http_info(edge_id, device_id, **kwargs) # noqa: E501 else: - (data) = self.assign_device_to_edge_using_post_with_http_info(edge_id, device_id, - **kwargs) # noqa: E501 + (data) = self.assign_device_to_edge_using_post_with_http_info(edge_id, device_id, **kwargs) # noqa: E501 return data - def assign_device_to_edge_using_post_with_http_info(self, edge_id, device_id, **kwargs): + def assign_device_to_edge_using_post_with_http_info(self, edge_id, device_id, **kwargs): # noqa: E501 """assignDeviceToEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_device_to_edge_using_post(edge_id, device_id, async_req=True) + >>> thread = api.assign_device_to_edge_using_post_with_http_info(edge_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -187,18 +179,21 @@ def assign_device_to_edge_using_post_with_http_info(self, edge_id, device_id, ** 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_device_to_edge_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'customer_id' is set + # 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 `customer_id` when calling `assign_device_to_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `edge_id` when calling `assign_device_to_edge_using_post`") # noqa: E501 # 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 `assign_device_to_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `device_id` when calling `assign_device_to_edge_using_post`") # noqa: E501 collection_formats = {} @@ -220,10 +215,6 @@ def assign_device_to_edge_using_post_with_http_info(self, edge_id, device_id, ** header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -248,7 +239,7 @@ def assign_device_to_public_customer_using_post(self, device_id, **kwargs): # n This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_device_to_public_customer_using_post(device_id, async_req=True) + >>> thread = api.assign_device_to_public_customer_using_post(device_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -269,7 +260,7 @@ def assign_device_to_public_customer_using_post_with_http_info(self, device_id, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_device_to_public_customer_using_post_with_http_info(device_id, async_req=True) + >>> thread = api.assign_device_to_public_customer_using_post_with_http_info(device_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -287,13 +278,17 @@ def assign_device_to_public_customer_using_post_with_http_info(self, device_id, 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_device_to_public_customer_using_post" % 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 `assign_device_to_public_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `device_id` when calling `assign_device_to_public_customer_using_post`") # noqa: E501 collection_formats = {} @@ -313,10 +308,6 @@ def assign_device_to_public_customer_using_post_with_http_info(self, device_id, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -336,45 +327,45 @@ def assign_device_to_public_customer_using_post_with_http_info(self, device_id, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def claim_device_using_post1(self, device_name, **kwargs): # noqa: E501 - """claimDevice # noqa: E501 + def assign_device_to_tenant_using_post(self, tenant_id, device_id, **kwargs): # noqa: E501 + """assignDeviceToTenant # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.claim_device_using_post1(device_name, async_req=True) + >>> thread = api.assign_device_to_tenant_using_post(tenant_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str device_name: deviceName (required) - :param ClaimRequest claim_request: claimRequest - :return: DeferredResultResponseEntity + :param str tenant_id: tenantId (required) + :param str device_id: deviceId (required) + :return: Device 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_post1_with_http_info(device_name, **kwargs) # noqa: E501 + return self.assign_device_to_tenant_using_post_with_http_info(tenant_id, device_id, **kwargs) # noqa: E501 else: - (data) = self.claim_device_using_post1_with_http_info(device_name, **kwargs) # noqa: E501 + (data) = self.assign_device_to_tenant_using_post_with_http_info(tenant_id, device_id, **kwargs) # noqa: E501 return data - def claim_device_using_post1_with_http_info(self, device_name, **kwargs): # noqa: E501 - """claimDevice # noqa: E501 + def assign_device_to_tenant_using_post_with_http_info(self, tenant_id, device_id, **kwargs): # noqa: E501 + """assignDeviceToTenant # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.claim_device_using_post1_with_http_info(device_name, async_req=True) + >>> thread = api.assign_device_to_tenant_using_post_with_http_info(tenant_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str device_name: deviceName (required) - :param ClaimRequest claim_request: claimRequest - :return: DeferredResultResponseEntity + :param str tenant_id: tenantId (required) + :param str device_id: deviceId (required) + :return: Device If the method is called asynchronously, returns the request thread. """ - all_params = ['device_name', 'claim_request'] # noqa: E501 + all_params = ['tenant_id', 'device_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -382,19 +373,29 @@ def claim_device_using_post1_with_http_info(self, device_name, **kwargs): # noq 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_device_to_tenant_using_post" % 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_post1`") # noqa: E501 + # 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 `assign_device_to_tenant_using_post`") # noqa: E501 + # 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 `assign_device_to_tenant_using_post`") # noqa: E501 collection_formats = {} path_params = {} - if 'device_name' in params: - path_params['deviceName'] = params['device_name'] # noqa: E501 + if 'tenant_id' in params: + path_params['tenantId'] = params['tenant_id'] # noqa: E501 + if 'device_id' in params: + path_params['deviceId'] = params['device_id'] # noqa: E501 query_params = [] @@ -404,28 +405,22 @@ def claim_device_using_post1_with_http_info(self, device_name, **kwargs): # noq local_var_files = {} body_params = None - if 'claim_request' in params: - body_params = params['claim_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/customer/device/{deviceName}/claim', 'POST', + '/api/tenant/{tenantId}/device/{deviceId}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='DeferredResultResponseEntity', # noqa: E501 + response_type='Device', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -433,18 +428,45 @@ def claim_device_using_post1_with_http_info(self, device_name, **kwargs): # noq _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_edge_devices_using_get(self, edge_id, **kwargs): + def claim_device_using_post(self, device_name, **kwargs): # noqa: E501 + """claimDevice # 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) + >>> result = thread.get() + + :param async_req bool + :param str device_name: deviceName (required) + :param ClaimRequest body: claimRequest + :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_edge_devices_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + return self.claim_device_using_post_with_http_info(device_name, **kwargs) # noqa: E501 else: - (data) = self.get_edge_devices_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + (data) = self.claim_device_using_post_with_http_info(device_name, **kwargs) # noqa: E501 return data - def get_edge_devices_using_get_with_http_info(self, edge_id, **kwargs): - all_params = ['edge_id', 'type', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time' - 'page_size', - 'page'] + def claim_device_using_post_with_http_info(self, device_name, **kwargs): # noqa: E501 + """claimDevice # 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) + >>> result = thread.get() + + :param async_req bool + :param str device_name: deviceName (required) + :param ClaimRequest body: claimRequest + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_name', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -452,47 +474,25 @@ def get_edge_devices_using_get_with_http_info(self, edge_id, **kwargs): 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'] - - if ('edge_id' not in params or - params['edge_id'] is None): - raise ValueError( - "Missing the required parameter `edge_id` when calling `get_edge_devices_using_get`") # noqa: E501 - - if ('page_size' not in params or - params['page_size'] is None): - raise ValueError( - "Missing the required parameter `page_size` when calling `get_edge_devices_using_get`") # noqa: E501 - - if ('page' not in params or - params['page'] is None): - raise ValueError( - "Missing the required parameter `page` when calling `get_edge_devices_using_get`") # noqa: E501 + # 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 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 + if 'device_name' in params: + path_params['deviceName'] = params['device_name'] # noqa: E501 query_params = [] - 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 - 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 - 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 = {} @@ -500,6 +500,8 @@ def get_edge_devices_using_get_with_http_info(self, edge_id, **kwargs): 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( ['*/*']) # noqa: E501 @@ -512,15 +514,14 @@ def get_edge_devices_using_get_with_http_info(self, edge_id, **kwargs): auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/{edgeId}/devices{?type,textSearch,sortProperty,sortOrder,startTime,endTime,pageSize,page}', - 'GET', + '/api/customer/device/{deviceName}/claim', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Device]', # 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'), @@ -528,43 +529,45 @@ def get_edge_devices_using_get_with_http_info(self, edge_id, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def delete_device_using_delete(self, device_id, **kwargs): # noqa: E501 - """deleteDevice # noqa: E501 + def count_by_device_profile_and_empty_ota_package_using_get(self, ota_package_type, device_profile_id, **kwargs): # noqa: E501 + """countByDeviceProfileAndEmptyOtaPackage # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_device_using_delete(device_id, async_req=True) + >>> thread = api.count_by_device_profile_and_empty_ota_package_using_get(ota_package_type, device_profile_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str device_id: deviceId (required) - :return: None + :param str ota_package_type: otaPackageType (required) + :param str device_profile_id: deviceProfileId (required) + :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.delete_device_using_delete_with_http_info(device_id, **kwargs) # noqa: E501 + return self.count_by_device_profile_and_empty_ota_package_using_get_with_http_info(ota_package_type, device_profile_id, **kwargs) # noqa: E501 else: - (data) = self.delete_device_using_delete_with_http_info(device_id, **kwargs) # noqa: E501 + (data) = self.count_by_device_profile_and_empty_ota_package_using_get_with_http_info(ota_package_type, device_profile_id, **kwargs) # noqa: E501 return data - def delete_device_using_delete_with_http_info(self, device_id, **kwargs): # noqa: E501 - """deleteDevice # noqa: E501 + def count_by_device_profile_and_empty_ota_package_using_get_with_http_info(self, ota_package_type, device_profile_id, **kwargs): # noqa: E501 + """countByDeviceProfileAndEmptyOtaPackage # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_device_using_delete_with_http_info(device_id, async_req=True) + >>> thread = api.count_by_device_profile_and_empty_ota_package_using_get_with_http_info(ota_package_type, device_profile_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str device_id: deviceId (required) - :return: None + :param str ota_package_type: otaPackageType (required) + :param str device_profile_id: deviceProfileId (required) + :return: int If the method is called asynchronously, returns the request thread. """ - all_params = ['device_id'] # noqa: E501 + all_params = ['ota_package_type', 'device_profile_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -572,19 +575,29 @@ def delete_device_using_delete_with_http_info(self, device_id, **kwargs): # noq 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_by_device_profile_and_empty_ota_package_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 `delete_device_using_delete`") # noqa: E501 + # verify the required parameter 'ota_package_type' is set + if ('ota_package_type' not in params or + params['ota_package_type'] is None): + raise ValueError("Missing the required parameter `ota_package_type` when calling `count_by_device_profile_and_empty_ota_package_using_get`") # noqa: E501 + # verify the required parameter 'device_profile_id' is set + if ('device_profile_id' not in params or + params['device_profile_id'] is None): + raise ValueError("Missing the required parameter `device_profile_id` when calling `count_by_device_profile_and_empty_ota_package_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'device_id' in params: - path_params['deviceId'] = params['device_id'] # noqa: E501 + if 'ota_package_type' in params: + path_params['otaPackageType'] = params['ota_package_type'] # noqa: E501 + if 'device_profile_id' in params: + path_params['deviceProfileId'] = params['device_profile_id'] # noqa: E501 query_params = [] @@ -598,22 +611,18 @@ def delete_device_using_delete_with_http_info(self, device_id, **kwargs): # noq header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/device/{deviceId}', 'DELETE', + '/api/devices/count/{otaPackageType}/{deviceProfileId}', '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='int', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -621,43 +630,43 @@ def delete_device_using_delete_with_http_info(self, device_id, **kwargs): # noq _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def find_by_query_using_post1(self, query, **kwargs): # noqa: E501 - """findByQuery # noqa: E501 + def delete_device_using_delete(self, device_id, **kwargs): # noqa: E501 + """deleteDevice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_query_using_post1(query, async_req=True) + >>> thread = api.delete_device_using_delete(device_id, async_req=True) >>> result = thread.get() :param async_req bool - :param DeviceSearchQuery query: query (required) - :return: list[Device] + :param str device_id: deviceId (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_by_query_using_post1_with_http_info(query, **kwargs) # noqa: E501 + return self.delete_device_using_delete_with_http_info(device_id, **kwargs) # noqa: E501 else: - (data) = self.find_by_query_using_post1_with_http_info(query, **kwargs) # noqa: E501 + (data) = self.delete_device_using_delete_with_http_info(device_id, **kwargs) # noqa: E501 return data - def find_by_query_using_post1_with_http_info(self, query, **kwargs): # noqa: E501 - """findByQuery # noqa: E501 + def delete_device_using_delete_with_http_info(self, device_id, **kwargs): # noqa: E501 + """deleteDevice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_query_using_post1_with_http_info(query, async_req=True) + >>> thread = api.delete_device_using_delete_with_http_info(device_id, async_req=True) >>> result = thread.get() :param async_req bool - :param DeviceSearchQuery query: query (required) - :return: list[Device] + :param str device_id: deviceId (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['query'] # noqa: E501 + all_params = ['device_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -665,17 +674,23 @@ def find_by_query_using_post1_with_http_info(self, query, **kwargs): # noqa: E5 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_device_using_delete" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'query' is set - if ('query' not in params or - params['query'] is None): - raise ValueError( - "Missing the required parameter `query` when calling `find_by_query_using_post1`") # noqa: E501 + # 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 `delete_device_using_delete`") # noqa: E501 collection_formats = {} path_params = {} + if 'device_id' in params: + path_params['deviceId'] = params['device_id'] # noqa: E501 query_params = [] @@ -685,28 +700,18 @@ def find_by_query_using_post1_with_http_info(self, query, **kwargs): # noqa: E5 local_var_files = {} body_params = None - if 'query' in params: - body_params = params['query'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/devices', 'POST', + '/api/device/{deviceId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Device]', # 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'), @@ -714,47 +719,43 @@ def find_by_query_using_post1_with_http_info(self, query, **kwargs): # noqa: E5 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def unassign_device_from_edge_using_delete(self, edge_id, device_id, **kwargs): - """unassignDeviceFromEdge + def find_by_query_using_post1(self, body, **kwargs): # noqa: E501 + """findByQuery # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_device_from_edge_using_delete(edge_id, device_id, async_req=True) + >>> thread = api.find_by_query_using_post1(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str device_id: DeviceId (required) - :return: TextPageDataDevice - If the method is called asynchronously, - returns the request thread. + :param DeviceSearchQuery body: query (required) + :return: list[Device] + If the method is called asynchronously, + returns the request thread. """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.unassign_device_from_edge_using_delete_with_http_info(edge_id, device_id, **kwargs) + return self.find_by_query_using_post1_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.unassign_device_from_edge_using_delete_with_http_info(edge_id, device_id, **kwargs) + (data) = self.find_by_query_using_post1_with_http_info(body, **kwargs) # noqa: E501 return data - def unassign_device_from_edge_using_delete_with_http_info(self, edge_id, device_id, **kwargs): - """unassignDeviceFromEdge + def find_by_query_using_post1_with_http_info(self, body, **kwargs): # noqa: E501 + """findByQuery # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_device_from_edge_using_delete(edge_id, device_id, async_req=True) + >>> thread = api.find_by_query_using_post1_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: EdgeId (required) - :param str device_id: DeviceId (required) - :return: TextPageDataDevice - If the method is called asynchronously, - returns the request thread. + :param DeviceSearchQuery body: query (required) + :return: list[Device] + If the method is called asynchronously, + returns the request thread. """ - all_params = ['edge_id', 'device_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') @@ -762,28 +763,22 @@ def unassign_device_from_edge_using_delete_with_http_info(self, edge_id, device_ 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_by_query_using_post1" % 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 `unassign_device_from_edge_using_delete`") # noqa: E501 - if ('edge_id' not in params or - params['edge_id'] is None): - raise ValueError( - "Missing the required parameter `edge_id` when calling `unassign_device_from_edge_using_delete`") + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_by_query_using_post1`") # noqa: E501 collection_formats = {} path_params = {} - if 'device_id' in params: - path_params['deviceId'] = params['device_id'] # noqa: E501 - - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] - query_params = [] header_params = {} @@ -792,6 +787,8 @@ def unassign_device_from_edge_using_delete_with_http_info(self, edge_id, device_ 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( ['*/*']) # noqa: E501 @@ -804,14 +801,14 @@ def unassign_device_from_edge_using_delete_with_http_info(self, edge_id, device_ auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/{edgeId}/device/{deviceId}', 'DELETE', + '/api/devices', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Device', # noqa: E501 + response_type='list[Device]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -819,45 +816,57 @@ def unassign_device_from_edge_using_delete_with_http_info(self, edge_id, device_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_device_info_by_id_using_get(self, device_id, **kwargs): - """getDeviceInfoById + def get_customer_device_infos_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerDeviceInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_device_info_by_id_using_get(device_id, 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 device_id: DeviceId (required) - :return: TextPageDataDevice - If the method is called asynchronously, - returns the request thread. + :param str customer_id: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str device_profile_id: deviceProfileId + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :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_device_info_by_id_using_get_with_http_info(device_id, **kwargs) + return self.get_customer_device_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_device_info_by_id_using_get_with_http_info(device_id, **kwargs) + (data) = self.get_customer_device_infos_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 return data - def get_device_info_by_id_using_get_with_http_info(self, device_id, **kwargs): - """getDeviceInfoById + def get_customer_device_infos_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerDeviceInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_device_info_by_id_using_get(customer_id, 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 device_id: DeviceId (required) - :return: TextPageDataDevice - If the method is called asynchronously, - returns the request thread. + :param str customer_id: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str device_profile_id: deviceProfileId + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataDeviceInfo + If the method is called asynchronously, + returns the request thread. """ - all_params = ['device_id'] # noqa: E501 + all_params = ['customer_id', 'page_size', 'page', 'type', 'device_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') @@ -865,21 +874,47 @@ def get_device_info_by_id_using_get_with_http_info(self, device_id, **kwargs): 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 '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_by_id_using_get`") # noqa: E501 + # 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 'device_id' in params: - path_params['deviceId'] = params['device_id'] # noqa: E501 + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 query_params = [] + 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 '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 '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 = {} @@ -891,22 +926,18 @@ def get_device_info_by_id_using_get_with_http_info(self, device_id, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/device/info/{deviceId}', 'GET', + '/api/customer/{customerId}/deviceInfos{?type,deviceProfileId,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Device', # 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'), @@ -914,58 +945,55 @@ def get_device_info_by_id_using_get_with_http_info(self, device_id, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_customer_device_infos_using_get(self, customer_id, page_size, page, **kwargs): - """getCustomerDeviceInfos + def get_customer_devices_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerDevices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_device_infos_using_get(customer_id, page_size, page, async_req=True) + >>> thread = api.get_customer_devices_using_get(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str customer_id: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type - :param str device_profile_id: deviceProfileId :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDevice - If the method is called asynchronously, - returns the request thread. + :return: PageDataDevice + 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) + return self.get_customer_devices_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) + (data) = self.get_customer_devices_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): - """getCustomerDeviceInfos + def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerDevices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_device_infos_using_get(customer_id, page_size, page, async_req=True) + >>> thread = api.get_customer_devices_using_get_with_http_info(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str customer_id: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type - :param str device_profile_id: deviceProfileId :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDevice - If the method is called asynchronously, - returns the request thread. + :return: PageDataDevice + If the method is called asynchronously, + returns the request thread. """ - all_params = ['customer_id', 'type', 'device_profile_id', 'text_search', 'sort_property', 'sort_order', - 'page_size', 'page'] + + 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') @@ -973,23 +1001,25 @@ def get_customer_device_infos_using_get_with_http_info(self, customer_id, page_s 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_devices_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_devices_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_devices_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_devices_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_customer_devices_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_devices_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_customer_devices_using_get`") # noqa: E501 collection_formats = {} @@ -1000,8 +1030,6 @@ def get_customer_device_infos_using_get_with_http_info(self, customer_id, page_s query_params = [] 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'])) if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: @@ -1023,23 +1051,18 @@ def get_customer_device_infos_using_get_with_http_info(self, customer_id, page_s header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/customer/{customerId}/deviceInfos{?type,deviceProfileId,textSearch,sortProperty,sortOrder,pageSize,page}', - 'GET', + '/api/customer/{customerId}/devices{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataDevice', # noqa: E501 + response_type='PageDataDevice', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1047,102 +1070,69 @@ def get_customer_device_infos_using_get_with_http_info(self, customer_id, page_s _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 - """getCustomerDevices # noqa: E501 + def get_device_by_id_using_get(self, device_id, **kwargs): # noqa: E501 + """getDeviceById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_devices_using_get(customer_id, page_size, page, async_req=True) + >>> thread = api.get_device_by_id_using_get(device_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str customer_id: customerId (required) - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDevice + :param str device_id: deviceId (required) + :return: Device 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_devices_using_get_with_http_info(customer_id, page_size, page, - **kwargs) # noqa: E501 + return self.get_device_by_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 else: - (data) = self.get_customer_devices_using_get_with_http_info(customer_id, page_size, page, - **kwargs) # noqa: E501 + (data) = self.get_device_by_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 return data - def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 - """getCustomerDevices # noqa: E501 + def get_device_by_id_using_get_with_http_info(self, device_id, **kwargs): # noqa: E501 + """getDeviceById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_devices_using_get_with_http_info(customer_id, async_req=True) + >>> thread = api.get_device_by_id_using_get_with_http_info(device_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str customer_id: customerId (required) - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDevice + :param str device_id: deviceId (required) + :return: Device If the method is called asynchronously, returns the request thread. """ - all_params = ['customer_id', 'type', 'text_search', 'sort_property', 'sort_order', 'page_size', - 'page'] # noqa: E501 + 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']): - 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_devices_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_devices_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_devices_using_get`") # noqa: E501 + 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_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_by_id_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'customer_id' in params: - path_params['customerId'] = params['customer_id'] # noqa: E501 + if 'device_id' in params: + path_params['deviceId'] = params['device_id'] # noqa: E501 query_params = [] - 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 - 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 = {} @@ -1154,22 +1144,18 @@ def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/customer/{customerId}/devices{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/device/{deviceId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataDevice', # noqa: E501 + response_type='Device', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1177,38 +1163,38 @@ def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_device_by_id_using_get(self, device_id, **kwargs): # noqa: E501 - """getDeviceById # noqa: E501 + def get_device_credentials_by_device_id_using_get(self, device_id, **kwargs): # noqa: E501 + """getDeviceCredentialsByDeviceId # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_device_by_id_using_get(device_id, async_req=True) + >>> thread = api.get_device_credentials_by_device_id_using_get(device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str device_id: deviceId (required) - :return: Device + :return: DeviceCredentials 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_by_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 + return self.get_device_credentials_by_device_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 else: - (data) = self.get_device_by_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 + (data) = self.get_device_credentials_by_device_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 return data - def get_device_by_id_using_get_with_http_info(self, device_id, **kwargs): # noqa: E501 - """getDeviceById # noqa: E501 + def get_device_credentials_by_device_id_using_get_with_http_info(self, device_id, **kwargs): # noqa: E501 + """getDeviceCredentialsByDeviceId # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_device_by_id_using_get_with_http_info(device_id, async_req=True) + >>> thread = api.get_device_credentials_by_device_id_using_get_with_http_info(device_id, async_req=True) >>> result = thread.get() :param async_req bool :param str device_id: deviceId (required) - :return: Device + :return: DeviceCredentials If the method is called asynchronously, returns the request thread. """ @@ -1221,13 +1207,17 @@ def get_device_by_id_using_get_with_http_info(self, device_id, **kwargs): # noq 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_credentials_by_device_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_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `device_id` when calling `get_device_credentials_by_device_id_using_get`") # noqa: E501 collection_formats = {} @@ -1247,22 +1237,18 @@ def get_device_by_id_using_get_with_http_info(self, device_id, **kwargs): # noq header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/device/{deviceId}', 'GET', + '/api/device/{deviceId}/credentials', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Device', # noqa: E501 + response_type='DeviceCredentials', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1270,39 +1256,38 @@ def get_device_by_id_using_get_with_http_info(self, device_id, **kwargs): # noq _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_device_credentials_by_device_id_using_get(self, device_id, **kwargs): # noqa: E501 - """getDeviceCredentialsByDeviceId # noqa: E501 + def get_device_info_by_id_using_get(self, device_id, **kwargs): # noqa: E501 + """getDeviceInfoById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_device_credentials_by_device_id_using_get(device_id, 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: deviceId (required) - :return: DeviceCredentials + :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_credentials_by_device_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 + return self.get_device_info_by_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 else: - (data) = self.get_device_credentials_by_device_id_using_get_with_http_info(device_id, - **kwargs) # noqa: E501 + (data) = self.get_device_info_by_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 return data - def get_device_credentials_by_device_id_using_get_with_http_info(self, device_id, **kwargs): # noqa: E501 - """getDeviceCredentialsByDeviceId # noqa: E501 + def get_device_info_by_id_using_get_with_http_info(self, device_id, **kwargs): # noqa: E501 + """getDeviceInfoById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_device_credentials_by_device_id_using_get_with_http_info(device_id, 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: deviceId (required) - :return: DeviceCredentials + :return: DeviceInfo If the method is called asynchronously, returns the request thread. """ @@ -1315,13 +1300,17 @@ def get_device_credentials_by_device_id_using_get_with_http_info(self, device_id 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_credentials_by_device_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `device_id` when calling `get_device_info_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -1341,22 +1330,18 @@ def get_device_credentials_by_device_id_using_get_with_http_info(self, device_id header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/device/{deviceId}/credentials', 'GET', + '/api/device/info/{deviceId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='DeviceCredentials', # noqa: E501 + 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'), @@ -1369,7 +1354,7 @@ def get_device_types_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_device_types_using_get(async_req=True) + >>> thread = api.get_device_types_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -1389,7 +1374,7 @@ def get_device_types_using_get_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_device_types_using_get_with_http_info(async_req=True) + >>> thread = api.get_device_types_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -1406,6 +1391,11 @@ def get_device_types_using_get_with_http_info(self, **kwargs): # noqa: E501 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_types_using_get" % key + ) params[key] = val del params['kwargs'] @@ -1425,10 +1415,6 @@ def get_device_types_using_get_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1453,7 +1439,7 @@ def get_devices_by_ids_using_get(self, device_ids, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_devices_by_ids_using_get(device_ids, async_req=True) + >>> thread = api.get_devices_by_ids_using_get(device_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -1474,7 +1460,7 @@ def get_devices_by_ids_using_get_with_http_info(self, device_ids, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_devices_by_ids_using_get_with_http_info(device_ids, async_req=True) + >>> thread = api.get_devices_by_ids_using_get_with_http_info(device_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -1492,13 +1478,17 @@ def get_devices_by_ids_using_get_with_http_info(self, device_ids, **kwargs): # 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_devices_by_ids_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'device_ids' is set if ('device_ids' not in params or params['device_ids'] is None): - raise ValueError( - "Missing the required parameter `device_ids` when calling `get_devices_by_ids_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `device_ids` when calling `get_devices_by_ids_using_get`") # noqa: E501 collection_formats = {} @@ -1518,10 +1508,6 @@ def get_devices_by_ids_using_get_with_http_info(self, device_ids, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1541,43 +1527,59 @@ def get_devices_by_ids_using_get_with_http_info(self, device_ids, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_device_using_get(self, device_name, **kwargs): # noqa: E501 - """getTenantDevice # noqa: E501 + def get_edge_devices_using_get(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """getEdgeDevices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_device_using_get(device_name, async_req=True) + >>> thread = api.get_edge_devices_using_get(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str device_name: deviceName (required) - :return: Device + :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :param int start_time: startTime + :param int end_time: endTime + :return: PageDataDevice 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_device_using_get_with_http_info(device_name, **kwargs) # noqa: E501 + return self.get_edge_devices_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_tenant_device_using_get_with_http_info(device_name, **kwargs) # noqa: E501 + (data) = self.get_edge_devices_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 return data - def get_tenant_device_using_get_with_http_info(self, device_name, **kwargs): # noqa: E501 - """getTenantDevice # noqa: E501 + def get_edge_devices_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """getEdgeDevices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_device_using_get_with_http_info(device_name, async_req=True) + >>> thread = api.get_edge_devices_using_get_with_http_info(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str device_name: deviceName (required) - :return: Device + :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :param int start_time: startTime + :param int end_time: endTime + :return: PageDataDevice If the method is called asynchronously, returns the request thread. """ - all_params = ['device_name'] # 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') @@ -1585,21 +1587,49 @@ def get_tenant_device_using_get_with_http_info(self, device_name, **kwargs): # 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_devices_using_get" % 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 `get_tenant_device_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_devices_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_devices_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_devices_using_get`") # noqa: E501 collection_formats = {} path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 query_params = [] - if 'device_name' in params: - query_params.append(('deviceName', params['device_name'])) # 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 + 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 + 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 = {} @@ -1611,22 +1641,18 @@ def get_tenant_device_using_get_with_http_info(self, device_name, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/devices{?deviceName}', 'GET', + '/api/edge/{edgeId}/devices{?type,textSearch,sortProperty,sortOrder,startTime,endTime,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Device', # noqa: E501 + response_type='PageDataDevice', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1634,27 +1660,26 @@ def get_tenant_device_using_get_with_http_info(self, device_name, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_device_infos_using_get(self, page_size, page, **kwargs): + def get_tenant_device_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 """getTenantDeviceInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_device_infos_using_get(page_size, page, async_req=True) + >>> thread = api.get_tenant_device_infos_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str device_profile_id: deviceProfileId :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDevice + :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_tenant_device_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 @@ -1662,29 +1687,28 @@ def get_tenant_device_infos_using_get(self, page_size, page, **kwargs): (data) = self.get_tenant_device_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def get_tenant_device_infos_using_get_with_http_info(self, page_size, page, **kwargs): - """getTenantDevices # noqa: E501 + def get_tenant_device_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getTenantDeviceInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_device_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_tenant_device_infos_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str device_profile_id: deviceProfileId :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDevice + :return: PageDataDeviceInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['type', 'device_profile_id', 'text_search', 'sort_property', 'sort_order', 'page_size', - 'page'] # noqa: E501 + all_params = ['page_size', 'page', 'type', 'device_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') @@ -1692,18 +1716,21 @@ def get_tenant_device_infos_using_get_with_http_info(self, page_size, page, **kw 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_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_tenant_device_infos_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_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_tenant_device_infos_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_tenant_device_infos_using_get`") # noqa: E501 collection_formats = {} @@ -1713,7 +1740,7 @@ def get_tenant_device_infos_using_get_with_http_info(self, page_size, page, **kw 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'])) + query_params.append(('deviceProfileId', params['device_profile_id'])) # noqa: E501 if 'text_search' in params: query_params.append(('textSearch', params['text_search'])) # noqa: E501 if 'sort_property' in params: @@ -1735,10 +1762,6 @@ def get_tenant_device_infos_using_get_with_http_info(self, page_size, page, **kw header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1750,7 +1773,7 @@ def get_tenant_device_infos_using_get_with_http_info(self, page_size, page, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataDevice', # 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'), @@ -1758,47 +1781,43 @@ def get_tenant_device_infos_using_get_with_http_info(self, page_size, page, **kw _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def assign_device_to_tenant_using_post(self, tenant_id, device_id, **kwargs): - """assignDeviceToTenant # noqa: E501 + def get_tenant_device_using_get(self, device_name, **kwargs): # noqa: E501 + """getTenantDevice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_device_to_tenant_using_post(tenant_id, device_id, async_req=True) + >>> thread = api.get_tenant_device_using_get(device_name, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_id: tenantId (required) - :param str device_id: deviceId (required) - :return: TextPageDataDevice + :param str device_name: deviceName (required) + :return: Device If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.assign_device_to_tenant_using_post_with_http_info(tenant_id, device_id, **kwargs) # noqa: E501 + return self.get_tenant_device_using_get_with_http_info(device_name, **kwargs) # noqa: E501 else: - (data) = self.assign_device_to_tenant_using_post_with_http_info(tenant_id, device_id, - **kwargs) # noqa: E501 + (data) = self.get_tenant_device_using_get_with_http_info(device_name, **kwargs) # noqa: E501 return data - def assign_device_to_tenant_using_post_with_http_info(self, tenant_id, device_id, **kwargs): - """assignDeviceToTenant # noqa: E501 + def get_tenant_device_using_get_with_http_info(self, device_name, **kwargs): # noqa: E501 + """getTenantDevice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_device_to_tenant_using_post_with_http_info(tenant_id, device_id, async_req=True) + >>> thread = api.get_tenant_device_using_get_with_http_info(device_name, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_id: tenantId (required) - :param str device_id: deviceId (required) - :return: TextPageDataDevice + :param str device_name: deviceName (required) + :return: Device If the method is called asynchronously, returns the request thread. """ - all_params = ['tenant_id', 'device_id'] # noqa: E501 + all_params = ['device_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1806,29 +1825,25 @@ def assign_device_to_tenant_using_post_with_http_info(self, tenant_id, device_id 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_device_using_get" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'page_size' is set - if ('tenant_id' not in params or - params['tenant_id'] is None): - raise ValueError( - "Missing the required parameter `tenant_id` when calling `assign_device_to_tenant_using_post`") # noqa: E501 - # verify the required parameter 'page' is set - if ('device_id' not in params or - params['device_id'] is None): - raise ValueError( - "Missing the required parameter `device_id` when calling `assign_device_to_tenant_using_post`") # noqa: E501 + # 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 `get_tenant_device_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'tenant_id' in params: - path_params['tenantId'] = params['tenant_id'] # noqa: E501 - if 'device_id' in params: - path_params['deviceId'] = params['device_id'] - query_params = [] + if 'device_name' in params: + query_params.append(('deviceName', params['device_name'])) # noqa: E501 header_params = {} @@ -1840,22 +1855,18 @@ def assign_device_to_tenant_using_post_with_http_info(self, tenant_id, device_id header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/{tenantId}/device/{deviceId}', 'POST', + '/api/tenant/devices{?deviceName}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataDevice', # noqa: E501 + response_type='Device', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1868,17 +1879,17 @@ def get_tenant_devices_using_get(self, page_size, page, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_devices_using_get(page_size, page, async_req=True) + >>> thread = api.get_tenant_devices_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDevice + :return: PageDataDevice If the method is called asynchronously, returns the request thread. """ @@ -1894,22 +1905,22 @@ def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_devices_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_tenant_devices_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataDevice + :return: PageDataDevice If the method is called asynchronously, returns the request thread. """ - all_params = ['type', 'text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501 + all_params = ['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') @@ -1917,18 +1928,21 @@ def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs) 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_devices_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_tenant_devices_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_devices_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_devices_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_tenant_devices_using_get`") # noqa: E501 collection_formats = {} @@ -1958,10 +1972,6 @@ def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs) header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1973,7 +1983,7 @@ def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataDevice', # noqa: E501 + response_type='PageDataDevice', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1986,7 +1996,7 @@ def re_claim_device_using_delete(self, device_name, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.re_claim_device_using_delete(device_name, async_req=True) + >>> thread = api.re_claim_device_using_delete(device_name, async_req=True) >>> result = thread.get() :param async_req bool @@ -2007,7 +2017,7 @@ def re_claim_device_using_delete_with_http_info(self, device_name, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.re_claim_device_using_delete_with_http_info(device_name, async_req=True) + >>> thread = api.re_claim_device_using_delete_with_http_info(device_name, async_req=True) >>> result = thread.get() :param async_req bool @@ -2025,13 +2035,17 @@ def re_claim_device_using_delete_with_http_info(self, device_name, **kwargs): # 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 re_claim_device_using_delete" % 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 `re_claim_device_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `device_name` when calling `re_claim_device_using_delete`") # noqa: E501 collection_formats = {} @@ -2051,10 +2065,6 @@ def re_claim_device_using_delete_with_http_info(self, device_name, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -2074,43 +2084,43 @@ def re_claim_device_using_delete_with_http_info(self, device_name, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_device_credentials_using_post(self, device_credentials, **kwargs): # noqa: E501 + def save_device_credentials_using_post(self, body, **kwargs): # noqa: E501 """saveDeviceCredentials # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_device_credentials_using_post(device_credentials, async_req=True) + >>> thread = api.save_device_credentials_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param DeviceCredentials device_credentials: deviceCredentials (required) + :param DeviceCredentials body: deviceCredentials (required) :return: DeviceCredentials If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_device_credentials_using_post_with_http_info(device_credentials, **kwargs) # noqa: E501 + return self.save_device_credentials_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_device_credentials_using_post_with_http_info(device_credentials, **kwargs) # noqa: E501 + (data) = self.save_device_credentials_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_device_credentials_using_post_with_http_info(self, device_credentials, **kwargs): # noqa: E501 + def save_device_credentials_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveDeviceCredentials # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_device_credentials_using_post_with_http_info(device_credentials, async_req=True) + >>> thread = api.save_device_credentials_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param DeviceCredentials device_credentials: deviceCredentials (required) + :param DeviceCredentials body: deviceCredentials (required) :return: DeviceCredentials If the method is called asynchronously, returns the request thread. """ - all_params = ['device_credentials'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2118,13 +2128,17 @@ def save_device_credentials_using_post_with_http_info(self, device_credentials, 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_device_credentials_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'device_credentials' is set - if ('device_credentials' not in params or - params['device_credentials'] is None): - raise ValueError( - "Missing the required parameter `device_credentials` when calling `save_device_credentials_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_device_credentials_using_post`") # noqa: E501 collection_formats = {} @@ -2138,8 +2152,8 @@ def save_device_credentials_using_post_with_http_info(self, device_credentials, local_var_files = {} body_params = None - if 'device_credentials' in params: - body_params = params['device_credentials'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -2167,16 +2181,16 @@ def save_device_credentials_using_post_with_http_info(self, device_credentials, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_device_using_post(self, device, **kwargs): # noqa: E501 + def save_device_using_post(self, body, **kwargs): # noqa: E501 """saveDevice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_device_using_post(device, async_req=True) + >>> thread = api.save_device_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Device device: device (required) + :param Device body: device (required) :param str access_token: accessToken :return: Device If the method is called asynchronously, @@ -2184,28 +2198,28 @@ def save_device_using_post(self, device, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_device_using_post_with_http_info(device, **kwargs) # noqa: E501 + return self.save_device_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_device_using_post_with_http_info(device, **kwargs) # noqa: E501 + (data) = self.save_device_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_device_using_post_with_http_info(self, device, **kwargs): # noqa: E501 + def save_device_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveDevice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_device_using_post_with_http_info(device, async_req=True) + >>> thread = api.save_device_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Device device: device (required) + :param Device body: device (required) :param str access_token: accessToken :return: Device If the method is called asynchronously, returns the request thread. """ - all_params = ['device', 'access_token'] # 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') @@ -2213,13 +2227,17 @@ def save_device_using_post_with_http_info(self, device, **kwargs): # noqa: E501 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_device_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'device' is set - if ('device' not in params or - params['device'] is None): - raise ValueError( - "Missing the required parameter `device` when calling `save_device_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_device_using_post`") # noqa: E501 collection_formats = {} @@ -2235,8 +2253,8 @@ def save_device_using_post_with_http_info(self, device, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'device' in params: - body_params = params['device'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -2269,7 +2287,7 @@ def unassign_device_from_customer_using_delete(self, device_id, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_device_from_customer_using_delete(device_id, async_req=True) + >>> thread = api.unassign_device_from_customer_using_delete(device_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -2290,7 +2308,7 @@ def unassign_device_from_customer_using_delete_with_http_info(self, device_id, * This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_device_from_customer_using_delete_with_http_info(device_id, async_req=True) + >>> thread = api.unassign_device_from_customer_using_delete_with_http_info(device_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -2308,13 +2326,17 @@ def unassign_device_from_customer_using_delete_with_http_info(self, device_id, * 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_device_from_customer_using_delete" % 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 `unassign_device_from_customer_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `device_id` when calling `unassign_device_from_customer_using_delete`") # noqa: E501 collection_formats = {} @@ -2334,10 +2356,6 @@ def unassign_device_from_customer_using_delete_with_http_info(self, device_id, * header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -2357,51 +2375,45 @@ def unassign_device_from_customer_using_delete_with_http_info(self, device_id, * _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def count_by_device_profile_and_empty_ota_package_using_get(self, ota_package_type, device_profile_id, **kwargs): - """countByDeviceProfileAndEmptyOtaPackage # noqa: E501 + def unassign_device_from_edge_using_delete(self, edge_id, device_id, **kwargs): # noqa: E501 + """unassignDeviceFromEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.count_by_device_profile_and_empty_ota_package_using_get(ota_package_type, device_profile_id, async_req=True) + >>> thread = api.unassign_device_from_edge_using_delete(edge_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str ota_package_type: ota_packageType (required) - :param str device_profile_id: deviceProfileId (required) - :return: int64 + :param str edge_id: edgeId (required) + :param str device_id: deviceId (required) + :return: Device If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.count_by_device_profile_and_empty_ota_package_using_get_with_http_info(ota_package_type, - device_profile_id, - **kwargs) # noqa: E501 + return self.unassign_device_from_edge_using_delete_with_http_info(edge_id, device_id, **kwargs) # noqa: E501 else: - (data) = self.count_by_device_profile_and_empty_ota_package_using_get_with_http_info(ota_package_type, - device_profile_id, - **kwargs) # noqa: E501 + (data) = self.unassign_device_from_edge_using_delete_with_http_info(edge_id, device_id, **kwargs) # noqa: E501 return data - def count_by_device_profile_and_empty_ota_package_using_get_with_http_info(self, ota_package_type, - device_profile_id, **kwargs): - """countByDeviceProfileAndEmptyOtaPackage # noqa: E501 + def unassign_device_from_edge_using_delete_with_http_info(self, edge_id, device_id, **kwargs): # noqa: E501 + """unassignDeviceFromEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.count_by_device_profile_and_empty_ota_package_using_get_with_http_info(ota_package_type, device_profile_id, async_req=True) + >>> thread = api.unassign_device_from_edge_using_delete_with_http_info(edge_id, device_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str ota_package_type: ota_packageType (required) - :param str device_profile_id: deviceProfileId (required) - :return: int64 + :param str edge_id: edgeId (required) + :param str device_id: deviceId (required) + :return: Device If the method is called asynchronously, returns the request thread. """ - all_params = ['ota_package_type', 'device_profile_id'] # noqa: E501 + all_params = ['edge_id', 'device_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2409,26 +2421,29 @@ def count_by_device_profile_and_empty_ota_package_using_get_with_http_info(self, 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_device_from_edge_using_delete" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'ota_package_type' is set - if ('ota_package_type' not in params or - params['ota_package_type'] is None): - raise ValueError( - "Missing the required parameter `ota_package_type` when calling `count_by_device_profile_and_empty_ota_package_using_get`") # noqa: E501 - # verify the required parameter 'device_profile_id' is set - if ('device_profile_id' not in params or - params['device_profile_id'] is None): - raise ValueError( - "Missing the required parameter `device_profile_id` when calling `count_by_device_profile_and_empty_ota_package_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 `unassign_device_from_edge_using_delete`") # noqa: E501 + # 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 `unassign_device_from_edge_using_delete`") # noqa: E501 collection_formats = {} path_params = {} - if 'ota_package_type' in params: - path_params['otaPackageType'] = params['ota_package_type'] # noqa: E501 - if 'device_profile_id' in params: - path_params['deviceProfileId'] = params['device_profile_id'] # noqa: E501 + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + if 'device_id' in params: + path_params['deviceId'] = params['device_id'] # noqa: E501 query_params = [] @@ -2442,22 +2457,18 @@ def count_by_device_profile_and_empty_ota_package_using_get_with_http_info(self, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/devices/count/{otaPackageType}/{deviceProfileId}', 'GET', + '/api/edge/{edgeId}/device/{deviceId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='int64', # noqa: E501 + response_type='Device', # 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/device_profile_controller_api.py b/tb_rest_client/api/api_ce/device_profile_controller_api.py index cb7c2a62..04a6cc7c 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 @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -85,8 +84,8 @@ def delete_device_profile_using_delete_with_http_info(self, device_profile_id, * params[key] = val del params['kwargs'] # verify the required parameter 'device_profile_id' is set - if self.api_client.client_side_validation and ('device_profile_id' not in params or - params['device_profile_id'] is None): # noqa: E501 + if ('device_profile_id' not in params or + params['device_profile_id'] is None): raise ValueError("Missing the required parameter `device_profile_id` when calling `delete_device_profile_using_delete`") # noqa: E501 collection_formats = {} @@ -103,14 +102,6 @@ def delete_device_profile_using_delete_with_http_info(self, device_profile_id, * local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -200,10 +191,6 @@ def get_attributes_keys_using_get_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -289,10 +276,6 @@ def get_default_device_profile_info_using_get_with_http_info(self, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -364,8 +347,8 @@ def get_device_profile_by_id_using_get_with_http_info(self, device_profile_id, * params[key] = val del params['kwargs'] # verify the required parameter 'device_profile_id' is set - if self.api_client.client_side_validation and ('device_profile_id' not in params or - params['device_profile_id'] is None): # noqa: E501 + if ('device_profile_id' not in params or + params['device_profile_id'] is None): raise ValueError("Missing the required parameter `device_profile_id` when calling `get_device_profile_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -386,10 +369,6 @@ def get_device_profile_by_id_using_get_with_http_info(self, device_profile_id, * header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -461,8 +440,8 @@ def get_device_profile_info_by_id_using_get_with_http_info(self, device_profile_ params[key] = val del params['kwargs'] # verify the required parameter 'device_profile_id' is set - if self.api_client.client_side_validation and ('device_profile_id' not in params or - params['device_profile_id'] is None): # noqa: E501 + if ('device_profile_id' not in params or + params['device_profile_id'] is None): raise ValueError("Missing the required parameter `device_profile_id` when calling `get_device_profile_info_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -483,10 +462,6 @@ def get_device_profile_info_by_id_using_get_with_http_info(self, device_profile_ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -568,12 +543,12 @@ def get_device_profile_infos_using_get_with_http_info(self, page_size, page, **k params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_device_profile_infos_using_get`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_device_profile_infos_using_get`") # noqa: E501 collection_formats = {} @@ -604,10 +579,6 @@ def get_device_profile_infos_using_get_with_http_info(self, page_size, page, **k header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -687,12 +658,12 @@ def get_device_profiles_using_get_with_http_info(self, page_size, page, **kwargs params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_device_profiles_using_get`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_device_profiles_using_get`") # noqa: E501 collection_formats = {} @@ -721,10 +692,6 @@ def get_device_profiles_using_get_with_http_info(self, page_size, page, **kwargs header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -814,10 +781,6 @@ def get_timeseries_keys_using_get_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -837,43 +800,43 @@ def get_timeseries_keys_using_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_device_profile_using_post(self, device_profile, **kwargs): # noqa: E501 + def save_device_profile_using_post(self, body, **kwargs): # noqa: E501 """saveDeviceProfile # 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(device_profile, async_req=True) + >>> thread = api.save_device_profile_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param DeviceProfile device_profile: deviceProfile (required) + :param DeviceProfile body: deviceProfile (required) :return: DeviceProfile If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_device_profile_using_post_with_http_info(device_profile, **kwargs) # noqa: E501 + return self.save_device_profile_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_device_profile_using_post_with_http_info(device_profile, **kwargs) # noqa: E501 + (data) = self.save_device_profile_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_device_profile_using_post_with_http_info(self, device_profile, **kwargs): # noqa: E501 + def save_device_profile_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveDeviceProfile # 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(device_profile, async_req=True) + >>> thread = api.save_device_profile_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param DeviceProfile device_profile: deviceProfile (required) + :param DeviceProfile body: deviceProfile (required) :return: DeviceProfile If the method is called asynchronously, returns the request thread. """ - all_params = ['device_profile'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -888,10 +851,10 @@ def save_device_profile_using_post_with_http_info(self, device_profile, **kwargs ) params[key] = val del params['kwargs'] - # verify the required parameter 'device_profile' is set - if self.api_client.client_side_validation and ('device_profile' not in params or - params['device_profile'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `device_profile` when calling `save_device_profile_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_device_profile_using_post`") # noqa: E501 collection_formats = {} @@ -905,8 +868,8 @@ def save_device_profile_using_post_with_http_info(self, device_profile, **kwargs local_var_files = {} body_params = None - if 'device_profile' in params: - body_params = params['device_profile'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -986,8 +949,8 @@ def set_default_device_profile_using_post_with_http_info(self, device_profile_id params[key] = val del params['kwargs'] # verify the required parameter 'device_profile_id' is set - if self.api_client.client_side_validation and ('device_profile_id' not in params or - params['device_profile_id'] is None): # noqa: E501 + if ('device_profile_id' not in params or + params['device_profile_id'] is None): raise ValueError("Missing the required parameter `device_profile_id` when calling `set_default_device_profile_using_post`") # noqa: E501 collection_formats = {} @@ -1008,10 +971,6 @@ def set_default_device_profile_using_post_with_http_info(self, device_profile_id header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1029,4 +988,4 @@ def set_default_device_profile_using_post_with_http_info(self, device_profile_id _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_ce/edge_controller_api.py b/tb_rest_client/api/api_ce/edge_controller_api.py index 0e6d64a2..e18abf3b 100644 --- a/tb_rest_client/api/api_ce/edge_controller_api.py +++ b/tb_rest_client/api/api_ce/edge_controller_api.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -87,12 +86,12 @@ def activate_instance_using_post_with_http_info(self, license_secret, release_da params[key] = val del params['kwargs'] # verify the required parameter 'license_secret' is set - if self.api_client.client_side_validation and ('license_secret' not in params or - params['license_secret'] is None): # noqa: E501 + 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 self.api_client.client_side_validation and ('release_date' not in params or - params['release_date'] is None): # noqa: E501 + 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 = {} @@ -115,10 +114,6 @@ def activate_instance_using_post_with_http_info(self, license_secret, release_da header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -192,12 +187,12 @@ def assign_edge_to_customer_using_post_with_http_info(self, customer_id, edge_id params[key] = val del params['kwargs'] # verify the required parameter 'customer_id' is set - if self.api_client.client_side_validation and ('customer_id' not in params or - params['customer_id'] is None): # noqa: E501 + if ('customer_id' not in params or + params['customer_id'] is None): raise ValueError("Missing the required parameter `customer_id` when calling `assign_edge_to_customer_using_post`") # noqa: E501 # verify the required parameter 'edge_id' is set - if self.api_client.client_side_validation and ('edge_id' not in params or - params['edge_id'] is None): # noqa: E501 + if ('edge_id' not in params or + params['edge_id'] is None): raise ValueError("Missing the required parameter `edge_id` when calling `assign_edge_to_customer_using_post`") # noqa: E501 collection_formats = {} @@ -220,10 +215,6 @@ def assign_edge_to_customer_using_post_with_http_info(self, customer_id, edge_id header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -295,8 +286,8 @@ def assign_edge_to_public_customer_using_post_with_http_info(self, edge_id, **kw params[key] = val del params['kwargs'] # verify the required parameter 'edge_id' is set - if self.api_client.client_side_validation and ('edge_id' not in params or - params['edge_id'] is None): # noqa: E501 + if ('edge_id' not in params or + params['edge_id'] is None): raise ValueError("Missing the required parameter `edge_id` when calling `assign_edge_to_public_customer_using_post`") # noqa: E501 collection_formats = {} @@ -317,10 +308,6 @@ def assign_edge_to_public_customer_using_post_with_http_info(self, edge_id, **kw header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -340,43 +327,43 @@ 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, request, **kwargs): # noqa: E501 + def check_instance_using_post(self, body, **kwargs): # noqa: E501 """checkInstance # 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(request, async_req=True) + >>> thread = api.check_instance_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param object request: request (required) + :param object body: request (required) :return: object 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(request, **kwargs) # noqa: E501 + return self.check_instance_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.check_instance_using_post_with_http_info(request, **kwargs) # noqa: E501 + (data) = self.check_instance_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def check_instance_using_post_with_http_info(self, request, **kwargs): # noqa: E501 + def check_instance_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """checkInstance # 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(request, async_req=True) + >>> thread = api.check_instance_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param object request: request (required) + :param object body: request (required) :return: object If the method is called asynchronously, returns the request thread. """ - all_params = ['request'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -391,10 +378,10 @@ def check_instance_using_post_with_http_info(self, request, **kwargs): # noqa: ) params[key] = val del params['kwargs'] - # verify the required parameter 'request' is set - if self.api_client.client_side_validation and ('request' not in params or - params['request'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `request` when calling `check_instance_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `check_instance_using_post`") # noqa: E501 collection_formats = {} @@ -408,8 +395,8 @@ def check_instance_using_post_with_http_info(self, request, **kwargs): # noqa: local_var_files = {} body_params = None - if 'request' in params: - body_params = params['request'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -489,8 +476,8 @@ def delete_edge_using_delete_with_http_info(self, edge_id, **kwargs): # noqa: E params[key] = val del params['kwargs'] # verify the required parameter 'edge_id' is set - if self.api_client.client_side_validation and ('edge_id' not in params or - params['edge_id'] is None): # noqa: E501 + if ('edge_id' not in params or + params['edge_id'] is None): raise ValueError("Missing the required parameter `edge_id` when calling `delete_edge_using_delete`") # noqa: E501 collection_formats = {} @@ -507,14 +494,6 @@ def delete_edge_using_delete_with_http_info(self, edge_id, **kwargs): # noqa: E local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -534,43 +513,43 @@ def delete_edge_using_delete_with_http_info(self, edge_id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def find_by_query_using_post2(self, query, **kwargs): # noqa: E501 + def find_by_query_using_post2(self, body, **kwargs): # noqa: E501 """findByQuery # 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_by_query_using_post2(query, async_req=True) + >>> thread = api.find_by_query_using_post2(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EdgeSearchQuery query: query (required) + :param EdgeSearchQuery body: query (required) :return: list[Edge] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.find_by_query_using_post2_with_http_info(query, **kwargs) # noqa: E501 + return self.find_by_query_using_post2_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.find_by_query_using_post2_with_http_info(query, **kwargs) # noqa: E501 + (data) = self.find_by_query_using_post2_with_http_info(body, **kwargs) # noqa: E501 return data - def find_by_query_using_post2_with_http_info(self, query, **kwargs): # noqa: E501 + def find_by_query_using_post2_with_http_info(self, body, **kwargs): # noqa: E501 """findByQuery # 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_by_query_using_post2_with_http_info(query, async_req=True) + >>> thread = api.find_by_query_using_post2_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EdgeSearchQuery query: query (required) + :param EdgeSearchQuery body: query (required) :return: list[Edge] If the method is called asynchronously, returns the request thread. """ - all_params = ['query'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -585,10 +564,10 @@ def find_by_query_using_post2_with_http_info(self, query, **kwargs): # noqa: E5 ) params[key] = val del params['kwargs'] - # verify the required parameter 'query' is set - if self.api_client.client_side_validation and ('query' not in params or - params['query'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `query` when calling `find_by_query_using_post2`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_by_query_using_post2`") # noqa: E501 collection_formats = {} @@ -602,8 +581,8 @@ def find_by_query_using_post2_with_http_info(self, query, **kwargs): # noqa: E5 local_var_files = {} body_params = None - if 'query' in params: - body_params = params['query'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -683,8 +662,8 @@ def find_missing_to_related_rule_chains_using_get_with_http_info(self, edge_id, params[key] = val del params['kwargs'] # verify the required parameter 'edge_id' is set - if self.api_client.client_side_validation and ('edge_id' not in params or - params['edge_id'] is None): # noqa: E501 + if ('edge_id' not in params or + params['edge_id'] is None): raise ValueError("Missing the required parameter `edge_id` when calling `find_missing_to_related_rule_chains_using_get`") # noqa: E501 collection_formats = {} @@ -705,10 +684,6 @@ def find_missing_to_related_rule_chains_using_get_with_http_info(self, edge_id, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -792,16 +767,16 @@ def get_customer_edge_infos_using_get_with_http_info(self, customer_id, page_siz params[key] = val del params['kwargs'] # verify the required parameter 'customer_id' is set - if self.api_client.client_side_validation and ('customer_id' not in params or - params['customer_id'] is None): # noqa: E501 + 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 self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + 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 self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + 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 = {} @@ -834,10 +809,6 @@ def get_customer_edge_infos_using_get_with_http_info(self, customer_id, page_siz header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -921,16 +892,16 @@ def get_customer_edges_using_get_with_http_info(self, customer_id, page_size, pa params[key] = val del params['kwargs'] # verify the required parameter 'customer_id' is set - if self.api_client.client_side_validation and ('customer_id' not in params or - params['customer_id'] is None): # noqa: E501 + if ('customer_id' not in params or + params['customer_id'] is None): raise ValueError("Missing the required parameter `customer_id` when calling `get_customer_edges_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_customer_edges_using_get`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_customer_edges_using_get`") # noqa: E501 collection_formats = {} @@ -963,10 +934,6 @@ def get_customer_edges_using_get_with_http_info(self, customer_id, page_size, pa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1038,8 +1005,8 @@ def get_edge_by_id_using_get_with_http_info(self, edge_id, **kwargs): # noqa: E params[key] = val del params['kwargs'] # verify the required parameter 'edge_id' is set - if self.api_client.client_side_validation and ('edge_id' not in params or - params['edge_id'] is None): # noqa: E501 + if ('edge_id' not in params or + params['edge_id'] is None): raise ValueError("Missing the required parameter `edge_id` when calling `get_edge_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -1060,10 +1027,6 @@ def get_edge_by_id_using_get_with_http_info(self, edge_id, **kwargs): # noqa: E header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1135,8 +1098,8 @@ def get_edge_info_by_id_using_get_with_http_info(self, edge_id, **kwargs): # no params[key] = val del params['kwargs'] # verify the required parameter 'edge_id' is set - if self.api_client.client_side_validation and ('edge_id' not in params or - params['edge_id'] is None): # noqa: E501 + 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 = {} @@ -1157,10 +1120,6 @@ def get_edge_info_by_id_using_get_with_http_info(self, edge_id, **kwargs): # no header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1246,10 +1205,6 @@ def get_edge_types_using_get_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1321,8 +1276,8 @@ def get_edges_by_ids_using_get_with_http_info(self, edge_ids, **kwargs): # noqa params[key] = val del params['kwargs'] # verify the required parameter 'edge_ids' is set - if self.api_client.client_side_validation and ('edge_ids' not in params or - params['edge_ids'] is None): # noqa: E501 + if ('edge_ids' not in params or + params['edge_ids'] is None): raise ValueError("Missing the required parameter `edge_ids` when calling `get_edges_by_ids_using_get`") # noqa: E501 collection_formats = {} @@ -1343,10 +1298,6 @@ def get_edges_by_ids_using_get_with_http_info(self, edge_ids, **kwargs): # noqa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1426,12 +1377,12 @@ def get_edges_using_get_with_http_info(self, page_size, page, **kwargs): # noqa params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_edges_using_get`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_edges_using_get`") # noqa: E501 collection_formats = {} @@ -1460,10 +1411,6 @@ def get_edges_using_get_with_http_info(self, page_size, page, **kwargs): # noqa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1545,12 +1492,12 @@ def get_tenant_edge_infos_using_get_with_http_info(self, page_size, page, **kwar params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_edge_infos_using_get`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_tenant_edge_infos_using_get`") # noqa: E501 collection_formats = {} @@ -1581,10 +1528,6 @@ def get_tenant_edge_infos_using_get_with_http_info(self, page_size, page, **kwar header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1656,8 +1599,8 @@ def get_tenant_edge_using_get_with_http_info(self, edge_name, **kwargs): # noqa params[key] = val del params['kwargs'] # verify the required parameter 'edge_name' is set - if self.api_client.client_side_validation and ('edge_name' not in params or - params['edge_name'] is None): # noqa: E501 + if ('edge_name' not in params or + params['edge_name'] is None): raise ValueError("Missing the required parameter `edge_name` when calling `get_tenant_edge_using_get`") # noqa: E501 collection_formats = {} @@ -1678,10 +1621,6 @@ def get_tenant_edge_using_get_with_http_info(self, edge_name, **kwargs): # noqa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1763,12 +1702,12 @@ def get_tenant_edges_using_get_with_http_info(self, page_size, page, **kwargs): params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_edges_using_get`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_tenant_edges_using_get`") # noqa: E501 collection_formats = {} @@ -1799,10 +1738,6 @@ def get_tenant_edges_using_get_with_http_info(self, page_size, page, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1888,10 +1823,6 @@ def is_edges_support_enabled_using_get_with_http_info(self, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1911,43 +1842,43 @@ def is_edges_support_enabled_using_get_with_http_info(self, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_edge_using_post(self, edge, **kwargs): # noqa: E501 + def save_edge_using_post(self, body, **kwargs): # noqa: E501 """saveEdge # 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(edge, async_req=True) + >>> thread = api.save_edge_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Edge edge: edge (required) + :param Edge body: edge (required) :return: Edge If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_edge_using_post_with_http_info(edge, **kwargs) # noqa: E501 + return self.save_edge_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_edge_using_post_with_http_info(edge, **kwargs) # noqa: E501 + (data) = self.save_edge_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_edge_using_post_with_http_info(self, edge, **kwargs): # noqa: E501 + def save_edge_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveEdge # 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(edge, async_req=True) + >>> thread = api.save_edge_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Edge edge: edge (required) + :param Edge body: edge (required) :return: Edge If the method is called asynchronously, returns the request thread. """ - all_params = ['edge'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1962,10 +1893,10 @@ def save_edge_using_post_with_http_info(self, edge, **kwargs): # noqa: E501 ) params[key] = val del params['kwargs'] - # verify the required parameter 'edge' is set - if self.api_client.client_side_validation and ('edge' not in params or - params['edge'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `edge` when calling `save_edge_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_edge_using_post`") # noqa: E501 collection_formats = {} @@ -1979,8 +1910,8 @@ def save_edge_using_post_with_http_info(self, edge, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'edge' in params: - body_params = params['edge'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -2062,12 +1993,12 @@ def set_root_rule_chain_using_post_with_http_info(self, edge_id, rule_chain_id, params[key] = val del params['kwargs'] # verify the required parameter 'edge_id' is set - if self.api_client.client_side_validation and ('edge_id' not in params or - params['edge_id'] is None): # noqa: E501 + if ('edge_id' not in params or + params['edge_id'] is None): raise ValueError("Missing the required parameter `edge_id` when calling `set_root_rule_chain_using_post`") # noqa: E501 # verify the required parameter 'rule_chain_id' is set - if self.api_client.client_side_validation and ('rule_chain_id' not in params or - params['rule_chain_id'] is None): # noqa: E501 + 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 `set_root_rule_chain_using_post`") # noqa: E501 collection_formats = {} @@ -2090,10 +2021,6 @@ def set_root_rule_chain_using_post_with_http_info(self, edge_id, rule_chain_id, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -2165,8 +2092,8 @@ def sync_edge_using_post_with_http_info(self, edge_id, **kwargs): # noqa: E501 params[key] = val del params['kwargs'] # verify the required parameter 'edge_id' is set - if self.api_client.client_side_validation and ('edge_id' not in params or - params['edge_id'] is None): # noqa: E501 + if ('edge_id' not in params or + params['edge_id'] is None): raise ValueError("Missing the required parameter `edge_id` when calling `sync_edge_using_post`") # noqa: E501 collection_formats = {} @@ -2183,14 +2110,6 @@ def sync_edge_using_post_with_http_info(self, edge_id, **kwargs): # noqa: E501 local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -2262,8 +2181,8 @@ def unassign_edge_from_customer_using_delete_with_http_info(self, edge_id, **kwa params[key] = val del params['kwargs'] # verify the required parameter 'edge_id' is set - if self.api_client.client_side_validation and ('edge_id' not in params or - params['edge_id'] is None): # noqa: E501 + if ('edge_id' not in params or + params['edge_id'] is None): raise ValueError("Missing the required parameter `edge_id` when calling `unassign_edge_from_customer_using_delete`") # noqa: E501 collection_formats = {} @@ -2284,10 +2203,6 @@ def unassign_edge_from_customer_using_delete_with_http_info(self, edge_id, **kwa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -2305,4 +2220,4 @@ def unassign_edge_from_customer_using_delete_with_http_info(self, edge_id, **kwa _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_ce/edge_event_controller_api.py b/tb_rest_client/api/api_ce/edge_event_controller_api.py index e273a14e..013999a2 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 @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -99,16 +98,16 @@ def get_edge_events_using_get_with_http_info(self, edge_id, page_size, page, **k params[key] = val del params['kwargs'] # verify the required parameter 'edge_id' is set - if self.api_client.client_side_validation and ('edge_id' not in params or - params['edge_id'] is None): # noqa: E501 + if ('edge_id' not in params or + params['edge_id'] is None): raise ValueError("Missing the required parameter `edge_id` when calling `get_edge_events_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_edge_events_using_get`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_edge_events_using_get`") # noqa: E501 collection_formats = {} @@ -143,10 +142,6 @@ def get_edge_events_using_get_with_http_info(self, edge_id, page_size, page, **k header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -164,4 +159,4 @@ def get_edge_events_using_get_with_http_info(self, edge_id, page_size, page, **k _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_ce/entity_query_controller_api.py b/tb_rest_client/api/api_ce/entity_query_controller_api.py new file mode 100644 index 00000000..a678e622 --- /dev/null +++ b/tb_rest_client/api/api_ce/entity_query_controller_api.py @@ -0,0 +1,437 @@ +# 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 +""" + +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 EntityQueryControllerApi(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 count_entities_by_query_using_post(self, body, **kwargs): # noqa: E501 + """countEntitiesByQuery # 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_entities_by_query_using_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param EntityCountQuery body: query (required) + :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_entities_by_query_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.count_entities_by_query_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def count_entities_by_query_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """countEntitiesByQuery # 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_entities_by_query_using_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param EntityCountQuery body: query (required) + :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_entities_by_query_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `count_entities_by_query_using_post`") # noqa: E501 + + 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( + ['*/*']) # 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/entitiesQuery/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 find_alarm_data_by_query_using_post(self, body, **kwargs): # noqa: E501 + """findAlarmDataByQuery # 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_alarm_data_by_query_using_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AlarmDataQuery body: query (required) + :return: PageDataAlarmData + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find_alarm_data_by_query_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.find_alarm_data_by_query_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def find_alarm_data_by_query_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """findAlarmDataByQuery # 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_alarm_data_by_query_using_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AlarmDataQuery body: query (required) + :return: PageDataAlarmData + 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 find_alarm_data_by_query_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_alarm_data_by_query_using_post`") # noqa: E501 + + 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( + ['*/*']) # 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/find', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataAlarmData', # 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_entity_data_by_query_using_post(self, body, **kwargs): # noqa: E501 + """findEntityDataByQuery # 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_entity_data_by_query_using_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param EntityDataQuery body: query (required) + :return: PageDataEntityData + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find_entity_data_by_query_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.find_entity_data_by_query_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def find_entity_data_by_query_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """findEntityDataByQuery # 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_entity_data_by_query_using_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param EntityDataQuery body: query (required) + :return: PageDataEntityData + 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 find_entity_data_by_query_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_entity_data_by_query_using_post`") # noqa: E501 + + 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( + ['*/*']) # 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/entitiesQuery/find', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEntityData', # 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_entity_timeseries_and_attributes_keys_by_query_using_post(self, body, timeseries, attributes, **kwargs): # noqa: E501 + """findEntityTimeseriesAndAttributesKeysByQuery # 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_entity_timeseries_and_attributes_keys_by_query_using_post(body, timeseries, attributes, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param EntityDataQuery body: query (required) + :param bool timeseries: timeseries (required) + :param bool attributes: attributes (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.find_entity_timeseries_and_attributes_keys_by_query_using_post_with_http_info(body, timeseries, attributes, **kwargs) # noqa: E501 + else: + (data) = self.find_entity_timeseries_and_attributes_keys_by_query_using_post_with_http_info(body, timeseries, attributes, **kwargs) # noqa: E501 + return data + + def find_entity_timeseries_and_attributes_keys_by_query_using_post_with_http_info(self, body, timeseries, attributes, **kwargs): # noqa: E501 + """findEntityTimeseriesAndAttributesKeysByQuery # 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_entity_timeseries_and_attributes_keys_by_query_using_post_with_http_info(body, timeseries, attributes, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param EntityDataQuery body: query (required) + :param bool timeseries: timeseries (required) + :param bool attributes: attributes (required) + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'timeseries', 'attributes'] # 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_entity_timeseries_and_attributes_keys_by_query_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_entity_timeseries_and_attributes_keys_by_query_using_post`") # noqa: E501 + # verify the required parameter 'timeseries' is set + if ('timeseries' not in params or + params['timeseries'] is None): + raise ValueError("Missing the required parameter `timeseries` when calling `find_entity_timeseries_and_attributes_keys_by_query_using_post`") # noqa: E501 + # verify the required parameter 'attributes' is set + if ('attributes' not in params or + params['attributes'] is None): + raise ValueError("Missing the required parameter `attributes` when calling `find_entity_timeseries_and_attributes_keys_by_query_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'timeseries' in params: + query_params.append(('timeseries', params['timeseries'])) # noqa: E501 + if 'attributes' in params: + query_params.append(('attributes', params['attributes'])) # 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( + ['*/*']) # 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/entitiesQuery/find/keys{?timeseries,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) 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 1d5337d4..8fec5b16 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class EntityRelationControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def delete_relation_using_delete(self, from_id, from_type, relation_type, to_id, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_relation_using_delete(from_id, from_type, relation_type, to_id, to_type, async_req=True) + >>> thread = api.delete_relation_using_delete(from_id, from_type, relation_type, to_id, to_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -65,7 +63,7 @@ def delete_relation_using_delete_with_http_info(self, from_id, from_type, relati This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_relation_using_delete_with_http_info(from_id, from_type, relation_type, to_id, to_type, async_req=True) + >>> thread = api.delete_relation_using_delete_with_http_info(from_id, from_type, relation_type, to_id, to_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -88,7 +86,11 @@ def delete_relation_using_delete_with_http_info(self, from_id, from_type, relati 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_relation_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'from_id' is set @@ -136,14 +138,6 @@ def delete_relation_using_delete_with_http_info(self, from_id, from_type, relati local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -168,14 +162,14 @@ def delete_relations_using_delete(self, entity_id, entity_type, id, type, **kwar This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_relations_using_delete(entity_id, entity_type, async_req=True) + >>> thread = api.delete_relations_using_delete(entity_id, entity_type, id, type, async_req=True) >>> result = thread.get() :param async_req bool :param str entity_id: entityId (required) :param str entity_type: entityType (required) - :param str id: id (required) - :param str type: type (required) + :param str id: (required) + :param str type: (required) :return: None If the method is called asynchronously, returns the request thread. @@ -192,14 +186,14 @@ def delete_relations_using_delete_with_http_info(self, entity_id, entity_type, i This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_relations_using_delete_with_http_info(entity_id, entity_type, async_req=True) + >>> thread = api.delete_relations_using_delete_with_http_info(entity_id, entity_type, id, type, async_req=True) >>> result = thread.get() :param async_req bool :param str entity_id: entityId (required) :param str entity_type: entityType (required) - :param str id: id (required) - :param str type: type (required) + :param str id: (required) + :param str type: (required) :return: None If the method is called asynchronously, returns the request thread. @@ -213,10 +207,13 @@ def delete_relations_using_delete_with_http_info(self, entity_id, entity_type, i 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_relations_using_delete" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'entity_id' is set if ('entity_id' not in params or params['entity_id'] is None): @@ -225,16 +222,15 @@ def delete_relations_using_delete_with_http_info(self, entity_id, entity_type, i if ('entity_type' not in params or params['entity_type'] is None): raise ValueError("Missing the required parameter `entity_type` when calling `delete_relations_using_delete`") # noqa: E501 - # verify the required parameter 'entity_type' is set + # 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_relations_using_delete`") # noqa: E501 - # verify the required parameter 'entity_type' is set + # 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_relations_using_delete`") # noqa: E501 - collection_formats = {} path_params = {} @@ -255,19 +251,11 @@ def delete_relations_using_delete_with_http_info(self, entity_id, entity_type, i local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/relations{?entityId,entityType}', 'DELETE', + '/api/relations{?entityId,entityType,id,type}', 'DELETE', path_params, query_params, header_params, @@ -287,7 +275,7 @@ def find_by_from_using_get(self, from_id, from_type, relation_type, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_from_using_get(from_id, from_type, relation_type, async_req=True) + >>> thread = api.find_by_from_using_get(from_id, from_type, relation_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -311,7 +299,7 @@ def find_by_from_using_get_with_http_info(self, from_id, from_type, relation_typ This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_from_using_get_with_http_info(from_id, from_type, relation_type, async_req=True) + >>> thread = api.find_by_from_using_get_with_http_info(from_id, from_type, relation_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -332,7 +320,11 @@ def find_by_from_using_get_with_http_info(self, from_id, from_type, relation_typ 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_by_from_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'from_id' is set @@ -372,10 +364,6 @@ def find_by_from_using_get_with_http_info(self, from_id, from_type, relation_typ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -400,7 +388,7 @@ def find_by_from_using_get1(self, from_id, from_type, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_from_using_get1(from_id, from_type, async_req=True) + >>> thread = api.find_by_from_using_get1(from_id, from_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -423,7 +411,7 @@ def find_by_from_using_get1_with_http_info(self, from_id, from_type, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_from_using_get1_with_http_info(from_id, from_type, async_req=True) + >>> thread = api.find_by_from_using_get1_with_http_info(from_id, from_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -443,7 +431,11 @@ def find_by_from_using_get1_with_http_info(self, from_id, from_type, **kwargs): 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_by_from_using_get1" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'from_id' is set @@ -477,10 +469,6 @@ def find_by_from_using_get1_with_http_info(self, from_id, from_type, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -500,43 +488,43 @@ def find_by_from_using_get1_with_http_info(self, from_id, from_type, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def find_by_query_using_post2(self, query, **kwargs): # noqa: E501 + def find_by_query_using_post3(self, body, **kwargs): # noqa: E501 """findByQuery # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_query_using_post2(query, async_req=True) + >>> thread = api.find_by_query_using_post3(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EntityRelationsQuery query: query (required) + :param EntityRelationsQuery body: query (required) :return: list[EntityRelation] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.find_by_query_using_post2_with_http_info(query, **kwargs) # noqa: E501 + return self.find_by_query_using_post3_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.find_by_query_using_post2_with_http_info(query, **kwargs) # noqa: E501 + (data) = self.find_by_query_using_post3_with_http_info(body, **kwargs) # noqa: E501 return data - def find_by_query_using_post2_with_http_info(self, query, **kwargs): # noqa: E501 + def find_by_query_using_post3_with_http_info(self, body, **kwargs): # noqa: E501 """findByQuery # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_query_using_post2_with_http_info(query, async_req=True) + >>> thread = api.find_by_query_using_post3_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EntityRelationsQuery query: query (required) + :param EntityRelationsQuery body: query (required) :return: list[EntityRelation] If the method is called asynchronously, returns the request thread. """ - all_params = ['query'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -544,13 +532,17 @@ def find_by_query_using_post2_with_http_info(self, query, **kwargs): # noqa: E5 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_by_query_using_post3" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'query' is set - if ('query' not in params or - params['query'] is None): - raise ValueError("Missing the required parameter `query` when calling `find_by_query_using_post2`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_by_query_using_post3`") # noqa: E501 collection_formats = {} @@ -564,8 +556,8 @@ def find_by_query_using_post2_with_http_info(self, query, **kwargs): # noqa: E5 local_var_files = {} body_params = None - if 'query' in params: - body_params = params['query'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -598,7 +590,7 @@ def find_by_to_using_get(self, to_id, to_type, relation_type, **kwargs): # noqa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_to_using_get(to_id, to_type, relation_type, async_req=True) + >>> thread = api.find_by_to_using_get(to_id, to_type, relation_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -622,7 +614,7 @@ def find_by_to_using_get_with_http_info(self, to_id, to_type, relation_type, **k This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_to_using_get_with_http_info(to_id, to_type, relation_type, async_req=True) + >>> thread = api.find_by_to_using_get_with_http_info(to_id, to_type, relation_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -643,7 +635,11 @@ def find_by_to_using_get_with_http_info(self, to_id, to_type, relation_type, **k 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_by_to_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'to_id' is set @@ -683,10 +679,6 @@ def find_by_to_using_get_with_http_info(self, to_id, to_type, relation_type, **k header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -711,7 +703,7 @@ def find_by_to_using_get1(self, to_id, to_type, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_to_using_get1(to_id, to_type, async_req=True) + >>> thread = api.find_by_to_using_get1(to_id, to_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -734,7 +726,7 @@ def find_by_to_using_get1_with_http_info(self, to_id, to_type, **kwargs): # noq This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_to_using_get1_with_http_info(to_id, to_type, async_req=True) + >>> thread = api.find_by_to_using_get1_with_http_info(to_id, to_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -754,7 +746,11 @@ def find_by_to_using_get1_with_http_info(self, to_id, to_type, **kwargs): # noq 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_by_to_using_get1" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'to_id' is set @@ -788,10 +784,6 @@ def find_by_to_using_get1_with_http_info(self, to_id, to_type, **kwargs): # noq header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -816,7 +808,7 @@ def find_info_by_from_using_get(self, from_id, from_type, **kwargs): # noqa: E5 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_info_by_from_using_get(from_id, from_type, async_req=True) + >>> thread = api.find_info_by_from_using_get(from_id, from_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -839,7 +831,7 @@ def find_info_by_from_using_get_with_http_info(self, from_id, from_type, **kwarg This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_info_by_from_using_get_with_http_info(from_id, from_type, async_req=True) + >>> thread = api.find_info_by_from_using_get_with_http_info(from_id, from_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -859,7 +851,11 @@ def find_info_by_from_using_get_with_http_info(self, from_id, from_type, **kwarg 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_info_by_from_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'from_id' is set @@ -893,10 +889,6 @@ def find_info_by_from_using_get_with_http_info(self, from_id, from_type, **kwarg header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -916,43 +908,43 @@ def find_info_by_from_using_get_with_http_info(self, from_id, from_type, **kwarg _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def find_info_by_query_using_post(self, query, **kwargs): # noqa: E501 + def find_info_by_query_using_post(self, body, **kwargs): # noqa: E501 """findInfoByQuery # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_info_by_query_using_post(query, async_req=True) + >>> thread = api.find_info_by_query_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EntityRelationsQuery query: query (required) + :param EntityRelationsQuery body: query (required) :return: list[EntityRelationInfo] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.find_info_by_query_using_post_with_http_info(query, **kwargs) # noqa: E501 + return self.find_info_by_query_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.find_info_by_query_using_post_with_http_info(query, **kwargs) # noqa: E501 + (data) = self.find_info_by_query_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def find_info_by_query_using_post_with_http_info(self, query, **kwargs): # noqa: E501 + def find_info_by_query_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """findInfoByQuery # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_info_by_query_using_post_with_http_info(query, async_req=True) + >>> thread = api.find_info_by_query_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EntityRelationsQuery query: query (required) + :param EntityRelationsQuery body: query (required) :return: list[EntityRelationInfo] If the method is called asynchronously, returns the request thread. """ - all_params = ['query'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -960,13 +952,17 @@ def find_info_by_query_using_post_with_http_info(self, query, **kwargs): # noqa 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_info_by_query_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'query' is set - if ('query' not in params or - params['query'] is None): - raise ValueError("Missing the required parameter `query` when calling `find_info_by_query_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_info_by_query_using_post`") # noqa: E501 collection_formats = {} @@ -980,8 +976,8 @@ def find_info_by_query_using_post_with_http_info(self, query, **kwargs): # noqa local_var_files = {} body_params = None - if 'query' in params: - body_params = params['query'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -1014,7 +1010,7 @@ def find_info_by_to_using_get(self, to_id, to_type, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_info_by_to_using_get(to_id, to_type, async_req=True) + >>> thread = api.find_info_by_to_using_get(to_id, to_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -1037,7 +1033,7 @@ def find_info_by_to_using_get_with_http_info(self, to_id, to_type, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_info_by_to_using_get_with_http_info(to_id, to_type, async_req=True) + >>> thread = api.find_info_by_to_using_get_with_http_info(to_id, to_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -1057,7 +1053,11 @@ def find_info_by_to_using_get_with_http_info(self, to_id, to_type, **kwargs): # 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_info_by_to_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'to_id' is set @@ -1091,10 +1091,6 @@ def find_info_by_to_using_get_with_http_info(self, to_id, to_type, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1119,7 +1115,7 @@ def get_relation_using_get(self, from_id, from_type, relation_type, to_id, to_ty This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_relation_using_get(from_id, from_type, relation_type, to_id, to_type, async_req=True) + >>> thread = api.get_relation_using_get(from_id, from_type, relation_type, to_id, to_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -1145,7 +1141,7 @@ def get_relation_using_get_with_http_info(self, from_id, from_type, relation_typ This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_relation_using_get_with_http_info(from_id, from_type, relation_type, to_id, to_type, async_req=True) + >>> thread = api.get_relation_using_get_with_http_info(from_id, from_type, relation_type, to_id, to_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -1168,7 +1164,11 @@ def get_relation_using_get_with_http_info(self, from_id, from_type, relation_typ 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_relation_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'from_id' is set @@ -1220,10 +1220,6 @@ def get_relation_using_get_with_http_info(self, from_id, from_type, relation_typ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1243,43 +1239,43 @@ def get_relation_using_get_with_http_info(self, from_id, from_type, relation_typ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_relation_using_post(self, relation, **kwargs): # noqa: E501 + def save_relation_using_post(self, body, **kwargs): # noqa: E501 """saveRelation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_relation_using_post(relation, async_req=True) + >>> thread = api.save_relation_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EntityRelation relation: relation (required) + :param EntityRelation body: relation (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.save_relation_using_post_with_http_info(relation, **kwargs) # noqa: E501 + return self.save_relation_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_relation_using_post_with_http_info(relation, **kwargs) # noqa: E501 + (data) = self.save_relation_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_relation_using_post_with_http_info(self, relation, **kwargs): # noqa: E501 + def save_relation_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveRelation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_relation_using_post_with_http_info(relation, async_req=True) + >>> thread = api.save_relation_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EntityRelation relation: relation (required) + :param EntityRelation body: relation (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['relation'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1287,13 +1283,17 @@ def save_relation_using_post_with_http_info(self, relation, **kwargs): # noqa: 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_relation_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'relation' is set - if ('relation' not in params or - params['relation'] is None): - raise ValueError("Missing the required parameter `relation` when calling `save_relation_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_relation_using_post`") # noqa: E501 collection_formats = {} @@ -1307,12 +1307,8 @@ def save_relation_using_post_with_http_info(self, relation, **kwargs): # noqa: local_var_files = {} body_params = None - if 'relation' in params: - body_params = params['relation'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 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 ee8e04df..fb328dde 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class EntityViewControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def assign_entity_view_to_customer_using_post(self, customer_id, entity_view_id, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_entity_view_to_customer_using_post(customer_id, entity_view_id, async_req=True) + >>> thread = api.assign_entity_view_to_customer_using_post(customer_id, entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -51,20 +49,17 @@ def assign_entity_view_to_customer_using_post(self, customer_id, entity_view_id, """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.assign_entity_view_to_customer_using_post_with_http_info(customer_id, entity_view_id, - **kwargs) # noqa: E501 + return self.assign_entity_view_to_customer_using_post_with_http_info(customer_id, entity_view_id, **kwargs) # noqa: E501 else: - (data) = self.assign_entity_view_to_customer_using_post_with_http_info(customer_id, entity_view_id, - **kwargs) # noqa: E501 + (data) = self.assign_entity_view_to_customer_using_post_with_http_info(customer_id, entity_view_id, **kwargs) # noqa: E501 return data - def assign_entity_view_to_customer_using_post_with_http_info(self, customer_id, entity_view_id, - **kwargs): # noqa: E501 + def assign_entity_view_to_customer_using_post_with_http_info(self, customer_id, entity_view_id, **kwargs): # noqa: E501 """assignEntityViewToCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_entity_view_to_customer_using_post_with_http_info(customer_id, entity_view_id, async_req=True) + >>> thread = api.assign_entity_view_to_customer_using_post_with_http_info(customer_id, entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -83,18 +78,21 @@ def assign_entity_view_to_customer_using_post_with_http_info(self, customer_id, 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_entity_view_to_customer_using_post" % 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 `assign_entity_view_to_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `customer_id` when calling `assign_entity_view_to_customer_using_post`") # noqa: E501 # 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 `assign_entity_view_to_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_view_id` when calling `assign_entity_view_to_customer_using_post`") # noqa: E501 collection_formats = {} @@ -116,10 +114,6 @@ def assign_entity_view_to_customer_using_post_with_http_info(self, customer_id, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -139,12 +133,113 @@ def assign_entity_view_to_customer_using_post_with_http_info(self, customer_id, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def assign_entity_view_to_edge_using_post(self, edge_id, entity_view_id, **kwargs): # noqa: E501 + """assignEntityViewToEdge # 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_entity_view_to_edge_using_post(edge_id, entity_view_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str entity_view_id: entityViewId (required) + :return: EntityView + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.assign_entity_view_to_edge_using_post_with_http_info(edge_id, entity_view_id, **kwargs) # noqa: E501 + else: + (data) = self.assign_entity_view_to_edge_using_post_with_http_info(edge_id, entity_view_id, **kwargs) # noqa: E501 + return data + + def assign_entity_view_to_edge_using_post_with_http_info(self, edge_id, entity_view_id, **kwargs): # noqa: E501 + """assignEntityViewToEdge # 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_entity_view_to_edge_using_post_with_http_info(edge_id, entity_view_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str entity_view_id: entityViewId (required) + :return: EntityView + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_id', '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 assign_entity_view_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 `assign_entity_view_to_edge_using_post`") # noqa: E501 + # 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 `assign_entity_view_to_edge_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + 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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/{edgeId}/entityView/{entityViewId}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EntityView', # 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_entity_view_to_public_customer_using_post(self, entity_view_id, **kwargs): # noqa: E501 """assignEntityViewToPublicCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_entity_view_to_public_customer_using_post(entity_view_id, async_req=True) + >>> thread = api.assign_entity_view_to_public_customer_using_post(entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -155,11 +250,9 @@ def assign_entity_view_to_public_customer_using_post(self, entity_view_id, **kwa """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.assign_entity_view_to_public_customer_using_post_with_http_info(entity_view_id, - **kwargs) # noqa: E501 + return self.assign_entity_view_to_public_customer_using_post_with_http_info(entity_view_id, **kwargs) # noqa: E501 else: - (data) = self.assign_entity_view_to_public_customer_using_post_with_http_info(entity_view_id, - **kwargs) # noqa: E501 + (data) = self.assign_entity_view_to_public_customer_using_post_with_http_info(entity_view_id, **kwargs) # noqa: E501 return data def assign_entity_view_to_public_customer_using_post_with_http_info(self, entity_view_id, **kwargs): # noqa: E501 @@ -167,7 +260,7 @@ def assign_entity_view_to_public_customer_using_post_with_http_info(self, entity This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_entity_view_to_public_customer_using_post_with_http_info(entity_view_id, async_req=True) + >>> thread = api.assign_entity_view_to_public_customer_using_post_with_http_info(entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -185,13 +278,17 @@ def assign_entity_view_to_public_customer_using_post_with_http_info(self, entity 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_entity_view_to_public_customer_using_post" % 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 `assign_entity_view_to_public_customer_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_view_id` when calling `assign_entity_view_to_public_customer_using_post`") # noqa: E501 collection_formats = {} @@ -211,10 +308,6 @@ def assign_entity_view_to_public_customer_using_post_with_http_info(self, entity header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -239,7 +332,7 @@ def delete_entity_view_using_delete(self, entity_view_id, **kwargs): # noqa: E5 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_entity_view_using_delete(entity_view_id, async_req=True) + >>> thread = api.delete_entity_view_using_delete(entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -260,7 +353,7 @@ def delete_entity_view_using_delete_with_http_info(self, entity_view_id, **kwarg This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_entity_view_using_delete_with_http_info(entity_view_id, async_req=True) + >>> thread = api.delete_entity_view_using_delete_with_http_info(entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -278,13 +371,17 @@ def delete_entity_view_using_delete_with_http_info(self, entity_view_id, **kwarg 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_entity_view_using_delete" % 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 `delete_entity_view_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_view_id` when calling `delete_entity_view_using_delete`") # noqa: E501 collection_formats = {} @@ -300,14 +397,6 @@ def delete_entity_view_using_delete_with_http_info(self, entity_view_id, **kwarg local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -327,43 +416,43 @@ def delete_entity_view_using_delete_with_http_info(self, entity_view_id, **kwarg _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def find_by_query_using_post3(self, query, **kwargs): # noqa: E501 + def find_by_query_using_post4(self, body, **kwargs): # noqa: E501 """findByQuery # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_query_using_post3(query, async_req=True) + >>> thread = api.find_by_query_using_post4(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EntityViewSearchQuery query: query (required) + :param EntityViewSearchQuery body: query (required) :return: list[EntityView] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.find_by_query_using_post3_with_http_info(query, **kwargs) # noqa: E501 + return self.find_by_query_using_post4_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.find_by_query_using_post3_with_http_info(query, **kwargs) # noqa: E501 + (data) = self.find_by_query_using_post4_with_http_info(body, **kwargs) # noqa: E501 return data - def find_by_query_using_post3_with_http_info(self, query, **kwargs): # noqa: E501 + def find_by_query_using_post4_with_http_info(self, body, **kwargs): # noqa: E501 """findByQuery # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.find_by_query_using_post3_with_http_info(query, async_req=True) + >>> thread = api.find_by_query_using_post4_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EntityViewSearchQuery query: query (required) + :param EntityViewSearchQuery body: query (required) :return: list[EntityView] If the method is called asynchronously, returns the request thread. """ - all_params = ['query'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -371,13 +460,17 @@ def find_by_query_using_post3_with_http_info(self, query, **kwargs): # noqa: E5 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_by_query_using_post4" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'query' is set - if ('query' not in params or - params['query'] is None): - raise ValueError( - "Missing the required parameter `query` when calling `find_by_query_using_post3`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_by_query_using_post4`") # noqa: E501 collection_formats = {} @@ -391,8 +484,8 @@ def find_by_query_using_post3_with_http_info(self, query, **kwargs): # noqa: E5 local_var_files = {} body_params = None - if 'query' in params: - body_params = params['query'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -420,58 +513,55 @@ def find_by_query_using_post3_with_http_info(self, query, **kwargs): # noqa: E5 _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 - """getCustomerEntityViews # noqa: E501 + def get_customer_entity_view_infos_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerEntityViewInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_entity_views_using_get(customer_id, page_size, page, 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: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataEntityView + :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_views_using_get_with_http_info(customer_id, page_size, page, - **kwargs) # noqa: E501 + 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_views_using_get_with_http_info(customer_id, page_size, page, - **kwargs) # noqa: E501 + (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_views_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 - """getCustomerEntityViews # noqa: E501 + def get_customer_entity_view_infos_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerEntityViewInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_entity_views_using_get_with_http_info(customer_id, page_size, page, 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: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataEntityView + :return: PageDataEntityViewInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['customer_id', 'type', 'text_search', 'sort_property', 'sort_order', 'page_size', - 'page'] # 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') @@ -479,23 +569,25 @@ def get_customer_entity_views_using_get_with_http_info(self, customer_id, page_s 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_views_using_get`") # noqa: E501 + 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_views_using_get`") # noqa: E501 + 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_views_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_customer_entity_view_infos_using_get`") # noqa: E501 collection_formats = {} @@ -527,22 +619,18 @@ def get_customer_entity_views_using_get_with_http_info(self, customer_id, page_s header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/customer/{customerId}/entityViews{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/customer/{customerId}/entityViewInfos{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataEntityView', # noqa: E501 + 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'), @@ -550,43 +638,55 @@ def get_customer_entity_views_using_get_with_http_info(self, customer_id, page_s _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_entity_view_by_id_using_get(self, entity_view_id, **kwargs): # noqa: E501 - """getEntityViewById # noqa: E501 + def get_customer_entity_views_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerEntityViews # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_view_by_id_using_get(entity_view_id, async_req=True) + >>> thread = api.get_customer_entity_views_using_get(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_view_id: entityViewId (required) - :return: EntityView + :param str customer_id: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEntityView 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_by_id_using_get_with_http_info(entity_view_id, **kwargs) # noqa: E501 + return self.get_customer_entity_views_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_entity_view_by_id_using_get_with_http_info(entity_view_id, **kwargs) # noqa: E501 + (data) = self.get_customer_entity_views_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 return data - def get_entity_view_by_id_using_get_with_http_info(self, entity_view_id, **kwargs): # noqa: E501 - """getEntityViewById # noqa: E501 + def get_customer_entity_views_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerEntityViews # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_view_by_id_using_get_with_http_info(entity_view_id, async_req=True) + >>> thread = api.get_customer_entity_views_using_get_with_http_info(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_view_id: entityViewId (required) - :return: EntityView + :param str customer_id: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEntityView If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_view_id'] # 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') @@ -594,21 +694,45 @@ def get_entity_view_by_id_using_get_with_http_info(self, entity_view_id, **kwarg 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_views_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_by_id_using_get`") # noqa: E501 + # 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_views_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_views_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_views_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'entity_view_id' in params: - path_params['entityViewId'] = params['entity_view_id'] # noqa: E501 + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 query_params = [] + 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 + 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 = {} @@ -620,22 +744,18 @@ def get_entity_view_by_id_using_get_with_http_info(self, entity_view_id, **kwarg header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/entityView/{entityViewId}', 'GET', + '/api/customer/{customerId}/entityViews{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='EntityView', # noqa: E501 + response_type='PageDataEntityView', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -643,41 +763,59 @@ 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_types_using_get(self, **kwargs): # noqa: E501 - """getEntityViewTypes # noqa: E501 + def get_edge_entity_views_using_get(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """getEdgeEntityViews # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_view_types_using_get(async_req=True) + >>> thread = api.get_edge_entity_views_using_get(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :return: list[EntitySubtype] + :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :param int start_time: startTime + :param int end_time: endTime + :return: PageDataEntityView 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_types_using_get_with_http_info(**kwargs) # noqa: E501 + return self.get_edge_entity_views_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_entity_view_types_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_edge_entity_views_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 return data - def get_entity_view_types_using_get_with_http_info(self, **kwargs): # noqa: E501 - """getEntityViewTypes # noqa: E501 + def get_edge_entity_views_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """getEdgeEntityViews # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_view_types_using_get_with_http_info(async_req=True) + >>> thread = api.get_edge_entity_views_using_get_with_http_info(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :return: list[EntitySubtype] + :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :param int start_time: startTime + :param int end_time: endTime + :return: PageDataEntityView If the method is called asynchronously, returns the request thread. """ - all_params = [] # 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') @@ -685,14 +823,49 @@ def get_entity_view_types_using_get_with_http_info(self, **kwargs): # noqa: E50 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_entity_views_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_entity_views_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_entity_views_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_entity_views_using_get`") # noqa: E501 collection_formats = {} path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 query_params = [] + 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 + 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 + 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 = {} @@ -704,22 +877,18 @@ def get_entity_view_types_using_get_with_http_info(self, **kwargs): # noqa: E50 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/entityView/types', 'GET', + '/api/edge/{edgeId}/entityViews{?type,textSearch,sortProperty,sortOrder,startTime,endTime,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[EntitySubtype]', # noqa: E501 + response_type='PageDataEntityView', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -727,43 +896,43 @@ def get_entity_view_types_using_get_with_http_info(self, **kwargs): # noqa: E50 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_entity_view_using_get(self, entity_view_name, **kwargs): # noqa: E501 - """getTenantEntityView # noqa: E501 + def get_entity_view_by_id_using_get(self, entity_view_id, **kwargs): # noqa: E501 + """getEntityViewById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_entity_view_using_get(entity_view_name, async_req=True) + >>> thread = api.get_entity_view_by_id_using_get(entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_view_name: entityViewName (required) + :param str entity_view_id: entityViewId (required) :return: EntityView 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_entity_view_using_get_with_http_info(entity_view_name, **kwargs) # noqa: E501 + return self.get_entity_view_by_id_using_get_with_http_info(entity_view_id, **kwargs) # noqa: E501 else: - (data) = self.get_tenant_entity_view_using_get_with_http_info(entity_view_name, **kwargs) # noqa: E501 + (data) = self.get_entity_view_by_id_using_get_with_http_info(entity_view_id, **kwargs) # noqa: E501 return data - def get_tenant_entity_view_using_get_with_http_info(self, entity_view_name, **kwargs): # noqa: E501 - """getTenantEntityView # noqa: E501 + def get_entity_view_by_id_using_get_with_http_info(self, entity_view_id, **kwargs): # noqa: E501 + """getEntityViewById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_entity_view_using_get_with_http_info(entity_view_name, async_req=True) + >>> thread = api.get_entity_view_by_id_using_get_with_http_info(entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_view_name: entityViewName (required) + :param str entity_view_id: entityViewId (required) :return: EntityView If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_view_name'] # noqa: E501 + all_params = ['entity_view_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -771,21 +940,25 @@ def get_tenant_entity_view_using_get_with_http_info(self, entity_view_name, **kw 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_by_id_using_get" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'entity_view_name' is set - if ('entity_view_name' not in params or - params['entity_view_name'] is None): - raise ValueError( - "Missing the required parameter `entity_view_name` when calling `get_tenant_entity_view_using_get`") # noqa: E501 + # 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_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 = [] - if 'entity_view_name' in params: - query_params.append(('entityViewName', params['entity_view_name'])) # noqa: E501 header_params = {} @@ -797,15 +970,11 @@ def get_tenant_entity_view_using_get_with_http_info(self, entity_view_name, **kw header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/entityViews{?entityViewName}', 'GET', + '/api/entityView/{entityViewId}', 'GET', path_params, query_params, header_params, @@ -820,161 +989,43 @@ def get_tenant_entity_view_using_get_with_http_info(self, entity_view_name, **kw _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_entity_views_using_get(self, page_size, page, **kwargs): # noqa: E501 - """getTenantEntityViews # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_entity_views_using_get(page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataEntityView - 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_entity_views_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 - else: - (data) = self.get_tenant_entity_views_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 - return data - - def get_tenant_entity_views_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """getTenantEntityViews # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_entity_views_using_get_with_http_info(page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataEntityView - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['type', 'text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # 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']): - 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_tenant_entity_views_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_entity_views_using_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - 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 - 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 - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/entityViews{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TextPageDataEntityView', # 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_entity_view_using_post(self, entity_view, **kwargs): # noqa: E501 - """saveEntityView # noqa: E501 + def get_entity_view_info_by_id_using_get(self, entity_view_id, **kwargs): # noqa: E501 + """getEntityViewInfoById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_view_using_post(entity_view, 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 EntityView entity_view: entityView (required) - :return: EntityView + :param str entity_view_id: entityViewId (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.save_entity_view_using_post_with_http_info(entity_view, **kwargs) # noqa: E501 + return self.get_entity_view_info_by_id_using_get_with_http_info(entity_view_id, **kwargs) # noqa: E501 else: - (data) = self.save_entity_view_using_post_with_http_info(entity_view, **kwargs) # noqa: E501 + (data) = self.get_entity_view_info_by_id_using_get_with_http_info(entity_view_id, **kwargs) # noqa: E501 return data - def save_entity_view_using_post_with_http_info(self, entity_view, **kwargs): # noqa: E501 - """saveEntityView # noqa: E501 + def get_entity_view_info_by_id_using_get_with_http_info(self, entity_view_id, **kwargs): # noqa: E501 + """getEntityViewInfoById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_view_using_post_with_http_info(entity_view, 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 EntityView entity_view: entityView (required) - :return: EntityView + :param str entity_view_id: entityViewId (required) + :return: EntityViewInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_view'] # noqa: E501 + all_params = ['entity_view_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -982,17 +1033,23 @@ def save_entity_view_using_post_with_http_info(self, entity_view, **kwargs): # 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' is set - if ('entity_view' not in params or - params['entity_view'] is None): - raise ValueError( - "Missing the required parameter `entity_view` when calling `save_entity_view_using_post`") # noqa: E501 + # 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 = [] @@ -1002,28 +1059,22 @@ def save_entity_view_using_post_with_http_info(self, entity_view, **kwargs): # local_var_files = {} body_params = None - if 'entity_view' in params: - body_params = params['entity_view'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/entityView', 'POST', + '/api/entityView/info/{entityViewId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='EntityView', # noqa: E501 + 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'), @@ -1031,45 +1082,41 @@ def save_entity_view_using_post_with_http_info(self, entity_view, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def unassign_entity_view_from_customer_using_delete(self, entity_view_id, **kwargs): # noqa: E501 - """unassignEntityViewFromCustomer # noqa: E501 + def get_entity_view_types_using_get(self, **kwargs): # noqa: E501 + """getEntityViewTypes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_entity_view_from_customer_using_delete(entity_view_id, async_req=True) + >>> thread = api.get_entity_view_types_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_view_id: entityViewId (required) - :return: EntityView + :return: list[EntitySubtype] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.unassign_entity_view_from_customer_using_delete_with_http_info(entity_view_id, - **kwargs) # noqa: E501 + return self.get_entity_view_types_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.unassign_entity_view_from_customer_using_delete_with_http_info(entity_view_id, - **kwargs) # noqa: E501 + (data) = self.get_entity_view_types_using_get_with_http_info(**kwargs) # noqa: E501 return data - def unassign_entity_view_from_customer_using_delete_with_http_info(self, entity_view_id, **kwargs): # noqa: E501 - """unassignEntityViewFromCustomer # noqa: E501 + def get_entity_view_types_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getEntityViewTypes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_entity_view_from_customer_using_delete_with_http_info(entity_view_id, async_req=True) + >>> thread = api.get_entity_view_types_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_view_id: entityViewId (required) - :return: EntityView + :return: list[EntitySubtype] If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_view_id'] # noqa: E501 + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1077,19 +1124,17 @@ def unassign_entity_view_from_customer_using_delete_with_http_info(self, entity_ 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_types_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 `unassign_entity_view_from_customer_using_delete`") # noqa: E501 collection_formats = {} path_params = {} - if 'entity_view_id' in params: - path_params['entityViewId'] = params['entity_view_id'] # noqa: E501 query_params = [] @@ -1103,22 +1148,18 @@ def unassign_entity_view_from_customer_using_delete_with_http_info(self, entity_ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/customer/entityView/{entityViewId}', 'DELETE', + '/api/entityView/types', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='EntityView', # noqa: E501 + response_type='list[EntitySubtype]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1126,51 +1167,53 @@ def unassign_entity_view_from_customer_using_delete_with_http_info(self, entity_ _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): - """getCustomerEntityViewInfos # noqa: E501 + def get_tenant_entity_view_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """getTenantEntityViewInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_entity_view_infos_using_get(customer_id, page_size, page async_req=True) + >>> thread = api.get_tenant_entity_view_infos_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str customer_id: customerId (required) :param str page_size: pageSize (required) :param str page: page (required) - :return: EntityView + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :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 + return self.get_tenant_entity_view_infos_using_get_with_http_info(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 + (data) = self.get_tenant_entity_view_infos_using_get_with_http_info(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): - """getCustomerEntityViewInfos # noqa: E501 + def get_tenant_entity_view_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getTenantEntityViewInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_entity_view_infos_using_get_with_http_info(customer_id, page_size, page async_req=True) + >>> thread = api.get_tenant_entity_view_infos_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str customer_id: customerId (required) :param str page_size: pageSize (required) :param str page: page (required) - :return: EntityView + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEntityViewInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['customer_id', 'type', 'text_search', 'sort_property', 'sort_order', 'page_size', - 'page'] # noqa: E501 + all_params = ['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') @@ -1178,32 +1221,27 @@ def get_customer_entity_view_infos_using_get_with_http_info(self, customer_id, p 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_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 + raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_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 + raise ValueError("Missing the required parameter `page` when calling `get_tenant_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 'type' in params: query_params.append(('type', params['type'])) # noqa: E501 if 'text_search' in params: @@ -1227,22 +1265,18 @@ def get_customer_entity_view_infos_using_get_with_http_info(self, customer_id, p header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/customer/{customerId}/entityViewInfos{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/tenant/entityViewInfos{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='EntityView', # noqa: E501 + 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'), @@ -1250,48 +1284,43 @@ def get_customer_entity_view_infos_using_get_with_http_info(self, customer_id, p _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def unassign_entity_view_from_edge_using_delete(self, edge_id, entity_view_id, **kwargs): - """unassignEntityViewFromEdge # noqa: E501 + def get_tenant_entity_view_using_get(self, entity_view_name, **kwargs): # noqa: E501 + """getTenantEntityView # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_entity_view_from_edge_using_delete(edge_id, entity_view_id async_req=True) + >>> thread = api.get_tenant_entity_view_using_get(entity_view_name, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str entity_view_id: entityViewId (required) - :return: None + :param str entity_view_name: entityViewName (required) + :return: EntityView If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.unassign_entity_view_from_edge_using_delete_with_http_info(edge_id, entity_view_id, - **kwargs) # noqa: E501 + return self.get_tenant_entity_view_using_get_with_http_info(entity_view_name, **kwargs) # noqa: E501 else: - (data) = self.unassign_entity_view_from_edge_using_delete_with_http_info(edge_id, entity_view_id, - **kwargs) # noqa: E501 + (data) = self.get_tenant_entity_view_using_get_with_http_info(entity_view_name, **kwargs) # noqa: E501 return data - def unassign_entity_view_from_edge_using_delete_with_http_info(self, edge_id, entity_view_id, **kwargs): - """unassignEntityViewFromEdge # noqa: E501 + def get_tenant_entity_view_using_get_with_http_info(self, entity_view_name, **kwargs): # noqa: E501 + """getTenantEntityView # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_entity_view_from_edge_using_delete_with_http_info(edge_id, entity_view_id async_req=True) + >>> thread = api.get_tenant_entity_view_using_get_with_http_info(entity_view_name, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str entity_view_id: entityViewId (required) - :return: None + :param str entity_view_name: entityViewName (required) + :return: EntityView If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'entity_view_id'] # noqa: E501 + all_params = ['entity_view_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1299,28 +1328,25 @@ def unassign_entity_view_from_edge_using_delete_with_http_info(self, edge_id, en 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_entity_view_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_entity_view_from_edge_using_delete`") # noqa: E501 - # 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 `unassign_entity_view_from_edge_using_delete`") # noqa: E501 + # verify the required parameter 'entity_view_name' is set + if ('entity_view_name' not in params or + params['entity_view_name'] is None): + raise ValueError("Missing the required parameter `entity_view_name` when calling `get_tenant_entity_view_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 - if 'entity_view_id' in params: - path_params['entityViewId'] = params['entity_view_id'] # noqa: E501 query_params = [] + if 'entity_view_name' in params: + query_params.append(('entityViewName', params['entity_view_name'])) # noqa: E501 header_params = {} @@ -1332,22 +1358,18 @@ def unassign_entity_view_from_edge_using_delete_with_http_info(self, edge_id, en header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/{edgeId}/entityView/{entityViewId}', 'DELETE', + '/api/tenant/entityViews{?entityViewName}', '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='EntityView', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1355,48 +1377,53 @@ def unassign_entity_view_from_edge_using_delete_with_http_info(self, edge_id, en _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def assign_entity_view_to_edge_using_post(self, edge_id, entity_view_id, **kwargs): - """assignEntityViewToEdge # noqa: E501 + def get_tenant_entity_views_using_get(self, page_size, page, **kwargs): # noqa: E501 + """getTenantEntityViews # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_entity_view_to_edge_using_post(edge_id, entity_view_id async_req=True) + >>> thread = api.get_tenant_entity_views_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str entity_view_id: entityViewId (required) - :return: EntityView + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEntityView If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.assign_entity_view_to_edge_using_post_with_http_info(edge_id, entity_view_id, - **kwargs) # noqa: E501 + return self.get_tenant_entity_views_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: - (data) = self.assign_entity_view_to_edge_using_post_with_http_info(edge_id, entity_view_id, - **kwargs) # noqa: E501 + (data) = self.get_tenant_entity_views_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def assign_entity_view_to_edge_using_post_with_http_info(self, edge_id, entity_view_id, **kwargs): - """assignEntityViewToEdge # noqa: E501 + def get_tenant_entity_views_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getTenantEntityViews # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_entity_view_to_edge_using_post_with_http_info(edge_id, entity_view_id async_req=True) + >>> thread = api.get_tenant_entity_views_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str entity_view_id: entityViewId (required) - :return: EntityView + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEntityView If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'entity_view_id'] # noqa: E501 + all_params = ['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') @@ -1404,28 +1431,39 @@ def assign_entity_view_to_edge_using_post_with_http_info(self, edge_id, entity_v 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_entity_views_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_entity_view_from_edge_using_delete`") # noqa: E501 - # 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 `unassign_entity_view_from_edge_using_delete`") # 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_entity_views_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_entity_views_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 - if 'entity_view_id' in params: - path_params['entityViewId'] = params['entity_view_id'] # noqa: E501 query_params = [] + 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 + 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 = {} @@ -1437,22 +1475,18 @@ def assign_entity_view_to_edge_using_post_with_http_info(self, edge_id, entity_v header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/{edgeId}/entityView/{entityViewId}', 'POST', + '/api/tenant/entityViews{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='EntityView', # noqa: E501 + response_type='PageDataEntityView', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1460,62 +1494,43 @@ def assign_entity_view_to_edge_using_post_with_http_info(self, edge_id, entity_v _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_edge_entity_views_using_get(self, edge_id, page_size, page, **kwargs): - """assignEntityViewToEdge # noqa: E501 + def save_entity_view_using_post(self, body, **kwargs): # noqa: E501 + """saveEntityView # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_edge_entity_views_using_get(edge_id, page_size, page, async_req=True) + >>> thread = api.save_entity_view_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str start_time: starTime - :param str end_time: endTime - :param str page_size: pageSize (required) - :param str page: page (required) - :return: list[EntityView] + :param EntityView body: entityView (required) + :return: EntityView 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_entity_views_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 + return self.save_entity_view_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.get_edge_entity_views_using_get_with_http_info(edge_id, page_size, page, - **kwargs) # noqa: E501 + (data) = self.save_entity_view_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def get_edge_entity_views_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): - """assignEntityViewToEdge # noqa: E501 + def save_entity_view_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveEntityView # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_edge_entity_views_using_get_with_http_info(edge_id, page_size, page, async_req=True) + >>> thread = api.save_entity_view_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str start_time: starTime - :param str end_time: endTime - :param str page_size: pageSize (required) - :param str page: page (required) - :return: list[EntityView] + :param EntityView body: entityView (required) + :return: EntityView If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'type', 'text_search', 'sort_property', 'sort_property', 'sort_order', 'start_time', - 'end_time', 'page_size', 'page'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1523,55 +1538,32 @@ def get_edge_entity_views_using_get_with_http_info(self, edge_id, page_size, pag 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_entity_view_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 `unassign_entity_view_from_edge_using_delete`") # 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_entity_views_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_entity_views_using_get`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_entity_view_using_post`") # noqa: E501 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 query_params = [] - 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 - 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 - 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( ['*/*']) # noqa: E501 @@ -1584,15 +1576,14 @@ def get_edge_entity_views_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}/entityViews{?type,textSearch,sortProperty,sortOrder,startTime,endTime,pageSize,page}', - 'GET', + '/api/entityView', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[EntityView]', # noqa: E501 + response_type='EntityView', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1600,12 +1591,12 @@ def get_edge_entity_views_using_get_with_http_info(self, edge_id, page_size, pag _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_entity_view_info_by_id_using_get(self, entity_view_id, **kwargs): - """getEntityViewInfoById # noqa: E501 + def unassign_entity_view_from_customer_using_delete(self, entity_view_id, **kwargs): # noqa: E501 + """unassignEntityViewFromCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_view_info_by_id_using_get(entity_view_id, async_req=True) + >>> thread = api.unassign_entity_view_from_customer_using_delete(entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -1614,20 +1605,19 @@ def get_entity_view_info_by_id_using_get(self, entity_view_id, **kwargs): 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 + return self.unassign_entity_view_from_customer_using_delete_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 + (data) = self.unassign_entity_view_from_customer_using_delete_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): - """getEntityViewInfoById # noqa: E501 + def unassign_entity_view_from_customer_using_delete_with_http_info(self, entity_view_id, **kwargs): # noqa: E501 + """unassignEntityViewFromCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_view_info_by_id_using_get_with_http_info(entity_view_id, async_req=True) + >>> thread = api.unassign_entity_view_from_customer_using_delete_with_http_info(entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -1645,13 +1635,17 @@ def get_entity_view_info_by_id_using_get_with_http_info(self, entity_view_id, ** 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_entity_view_from_customer_using_delete" % 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 + raise ValueError("Missing the required parameter `entity_view_id` when calling `unassign_entity_view_from_customer_using_delete`") # noqa: E501 collection_formats = {} @@ -1671,16 +1665,11 @@ def get_entity_view_info_by_id_using_get_with_http_info(self, entity_view_id, ** header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/entityView/info/{entityViewId}', - 'GET', + '/api/customer/entityView/{entityViewId}', 'DELETE', path_params, query_params, header_params, @@ -1695,58 +1684,45 @@ def get_entity_view_info_by_id_using_get_with_http_info(self, entity_view_id, ** _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_entity_view_infos_using_get(self, page_size, page, **kwargs): - """getTenantEntityViewInfos # noqa: E501 + def unassign_entity_view_from_edge_using_delete(self, edge_id, entity_view_id, **kwargs): # noqa: E501 + """unassignEntityViewFromEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_entity_view_infos_using_get(page_size, page, async_req=True) + >>> thread = api.unassign_entity_view_from_edge_using_delete(edge_id, entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str start_time: starTime - :param str end_time: endTime - :param str page_size: pageSize (required) - :param str page: page (required) - :return: list[EntityView] + :param str edge_id: edgeId (required) + :param str entity_view_id: entityViewId (required) + :return: EntityView 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_entity_view_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.unassign_entity_view_from_edge_using_delete_with_http_info(edge_id, entity_view_id, **kwargs) # noqa: E501 else: - (data) = self.get_tenant_entity_view_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.unassign_entity_view_from_edge_using_delete_with_http_info(edge_id, entity_view_id, **kwargs) # noqa: E501 return data - def get_tenant_entity_view_infos_using_get_with_http_info(self, page_size, page, **kwargs): - """getTenantEntityViewInfos # noqa: E501 + def unassign_entity_view_from_edge_using_delete_with_http_info(self, edge_id, entity_view_id, **kwargs): # noqa: E501 + """unassignEntityViewFromEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_entity_view_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.unassign_entity_view_from_edge_using_delete_with_http_info(edge_id, entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str start_time: starTime - :param str end_time: endTime - :param str page_size: pageSize (required) - :param str page: page (required) - :return: list[EntityView] + :param str edge_id: edgeId (required) + :param str entity_view_id: entityViewId (required) + :return: EntityView If the method is called asynchronously, returns the request thread. """ - all_params = ['type', 'text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501 + all_params = ['edge_id', 'entity_view_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1754,38 +1730,32 @@ def get_tenant_entity_view_infos_using_get_with_http_info(self, page_size, page, 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_entity_view_from_edge_using_delete" % 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_tenant_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_tenant_entity_view_infos_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 `unassign_entity_view_from_edge_using_delete`") # noqa: E501 + # 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 `unassign_entity_view_from_edge_using_delete`") # noqa: E501 collection_formats = {} path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + if 'entity_view_id' in params: + path_params['entityViewId'] = params['entity_view_id'] # noqa: E501 query_params = [] - 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 - 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 = [] @@ -1796,23 +1766,18 @@ def get_tenant_entity_view_infos_using_get_with_http_info(self, page_size, page, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/entityViewInfos{?type,textSearch,sortProperty,sortOrder,pageSize,page}', - 'GET', + '/api/edge/{edgeId}/entityView/{entityViewId}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[EntityView]', # noqa: E501 + response_type='EntityView', # 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/event_controller_api.py b/tb_rest_client/api/api_ce/event_controller_api.py index 08126031..d11f0eef 100644 --- a/tb_rest_client/api/api_ce/event_controller_api.py +++ b/tb_rest_client/api/api_ce/event_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class EventControllerApi(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 """ @@ -39,7 +37,7 @@ def get_events_using_get(self, entity_type, entity_id, event_type, tenant_id, pa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_events_using_get(entity_type, entity_id, event_type, tenant_id, page_size, page, async_req=True) + >>> thread = api.get_events_using_get(entity_type, entity_id, event_type, tenant_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -47,14 +45,14 @@ def get_events_using_get(self, entity_type, entity_id, event_type, tenant_id, pa :param str entity_id: entityId (required) :param str event_type: eventType (required) :param str tenant_id: tenantId (required) - :param str page_size: pageSize (required) - :param str page: page (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 :param int start_time: startTime :param int end_time: endTime - :return: TimePageDataEvent + :return: PageDataEvent If the method is called asynchronously, returns the request thread. """ @@ -70,7 +68,7 @@ def get_events_using_get_with_http_info(self, entity_type, entity_id, event_type This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_events_using_get_with_http_info(entity_type, entity_id, event_type, tenant_id, page_size, page, async_req=True) + >>> thread = api.get_events_using_get_with_http_info(entity_type, entity_id, event_type, tenant_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,14 +76,14 @@ def get_events_using_get_with_http_info(self, entity_type, entity_id, event_type :param str entity_id: entityId (required) :param str event_type: eventType (required) :param str tenant_id: tenantId (required) - :param str page_size: pageSize (required) - :param str page: page (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 :param int start_time: startTime :param int end_time: endTime - :return: TimePageDataEvent + :return: PageDataEvent If the method is called asynchronously, returns the request thread. """ @@ -98,7 +96,11 @@ def get_events_using_get_with_http_info(self, entity_type, entity_id, event_type 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_events_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_type' is set @@ -164,10 +166,6 @@ def get_events_using_get_with_http_info(self, entity_type, entity_id, event_type header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -179,7 +177,7 @@ def get_events_using_get_with_http_info(self, entity_type, entity_id, event_type body=body_params, post_params=form_params, files=local_var_files, - response_type='TimePageDataEvent', # noqa: E501 + response_type='PageDataEvent', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -192,21 +190,21 @@ def get_events_using_get1(self, entity_type, entity_id, tenant_id, page_size, pa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_events_using_get1(entity_type, entity_id, tenant_id, page_size, page, async_req=True) + >>> thread = api.get_events_using_get1(entity_type, entity_id, tenant_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str entity_type: entityType (required) :param str entity_id: entityId (required) :param str tenant_id: tenantId (required) - :param str page_size: pageSize (required) - :param str page: page (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 :param int start_time: startTime :param int end_time: endTime - :return: TimePageDataEvent + :return: PageDataEvent If the method is called asynchronously, returns the request thread. """ @@ -222,21 +220,21 @@ def get_events_using_get1_with_http_info(self, entity_type, entity_id, tenant_id This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_events_using_get1_with_http_info(entity_type, entity_id, tenant_id, page_size, page, async_req=True) + >>> thread = api.get_events_using_get1_with_http_info(entity_type, entity_id, tenant_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool :param str entity_type: entityType (required) :param str entity_id: entityId (required) :param str tenant_id: tenantId (required) - :param str page_size: pageSize (required) - :param str page: page (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 :param int start_time: startTime :param int end_time: endTime - :return: TimePageDataEvent + :return: PageDataEvent If the method is called asynchronously, returns the request thread. """ @@ -249,7 +247,11 @@ def get_events_using_get1_with_http_info(self, entity_type, entity_id, tenant_id 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_events_using_get1" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_type' is set @@ -309,6 +311,159 @@ def get_events_using_get1_with_http_info(self, entity_type, entity_id, tenant_id header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/events/{entityType}/{entityId}{?tenantId,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEvent', # 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_post(self, body, tenant_id, page_size, page, entity_type, entity_id, **kwargs): # noqa: E501 + """getEvents # noqa: 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_post(body, tenant_id, page_size, page, entity_type, entity_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param EventFilter body: eventFilter (required) + :param str tenant_id: tenantId (required) + :param int page_size: pageSize (required) + :param int page: page (required) + :param str entity_type: entityType (required) + :param str entity_id: entityId (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :param int start_time: startTime + :param int end_time: endTime + :return: PageDataEvent + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_events_using_post_with_http_info(body, tenant_id, page_size, page, entity_type, entity_id, **kwargs) # noqa: E501 + else: + (data) = self.get_events_using_post_with_http_info(body, tenant_id, page_size, page, entity_type, entity_id, **kwargs) # noqa: E501 + return data + + def get_events_using_post_with_http_info(self, body, tenant_id, page_size, page, entity_type, entity_id, **kwargs): # noqa: E501 + """getEvents # noqa: 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_post_with_http_info(body, tenant_id, page_size, page, entity_type, entity_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param EventFilter body: eventFilter (required) + :param str tenant_id: tenantId (required) + :param int page_size: pageSize (required) + :param int page: page (required) + :param str entity_type: entityType (required) + :param str entity_id: entityId (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :param int start_time: startTime + :param int end_time: endTime + :return: PageDataEvent + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'tenant_id', 'page_size', 'page', 'entity_type', 'entity_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_events_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `get_events_using_post`") # noqa: E501 + # 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_events_using_post`") # 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_events_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_events_using_post`") # 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_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 `get_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 'tenant_id' in params: + query_params.append(('tenantId', params['tenant_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 + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -317,14 +472,14 @@ def get_events_using_get1_with_http_info(self, entity_type, entity_id, tenant_id auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/events/{entityType}/{entityId}{?tenantId,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime}', 'GET', + '/api/events/{entityType}/{entityId}{?tenantId,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TimePageDataEvent', # noqa: E501 + response_type='PageDataEvent', # 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/lwm_2m_controller_api.py b/tb_rest_client/api/api_ce/lwm_2m_controller_api.py index 6a094167..fe8548ad 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 @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -85,8 +84,8 @@ def get_lwm2m_bootstrap_security_info_using_get_with_http_info(self, is_bootstra params[key] = val del params['kwargs'] # verify the required parameter 'is_bootstrap_server' is set - if self.api_client.client_side_validation and ('is_bootstrap_server' not in params or - params['is_bootstrap_server'] is None): # noqa: E501 + if ('is_bootstrap_server' not in params or + params['is_bootstrap_server'] is None): raise ValueError("Missing the required parameter `is_bootstrap_server` when calling `get_lwm2m_bootstrap_security_info_using_get`") # noqa: E501 collection_formats = {} @@ -107,10 +106,6 @@ def get_lwm2m_bootstrap_security_info_using_get_with_http_info(self, is_bootstra header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -139,7 +134,7 @@ def save_device_with_credentials_using_post(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool - :param object device_with_device_credentials: deviceWithDeviceCredentials + :param dict(str, object) body: deviceWithDeviceCredentials :return: Device If the method is called asynchronously, returns the request thread. @@ -160,13 +155,13 @@ def save_device_with_credentials_using_post_with_http_info(self, **kwargs): # n >>> result = thread.get() :param async_req bool - :param object device_with_device_credentials: deviceWithDeviceCredentials + :param dict(str, object) body: deviceWithDeviceCredentials :return: Device If the method is called asynchronously, returns the request thread. """ - all_params = ['device_with_device_credentials'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -194,8 +189,8 @@ def save_device_with_credentials_using_post_with_http_info(self, **kwargs): # n local_var_files = {} body_params = None - if 'device_with_device_credentials' in params: - body_params = params['device_with_device_credentials'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -221,4 +216,4 @@ def save_device_with_credentials_using_post_with_http_info(self, **kwargs): # n _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_ce/o_auth_2_config_template_controller_api.py b/tb_rest_client/api/api_ce/o_auth_2_config_template_controller_api.py new file mode 100644 index 00000000..559726bc --- /dev/null +++ b/tb_rest_client/api/api_ce/o_auth_2_config_template_controller_api.py @@ -0,0 +1,304 @@ +# 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 +""" + +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 OAuth2ConfigTemplateControllerApi(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_client_registration_template_using_delete(self, client_registration_template_id, **kwargs): # noqa: E501 + """deleteClientRegistrationTemplate # 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_client_registration_template_using_delete(client_registration_template_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str client_registration_template_id: clientRegistrationTemplateId (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_client_registration_template_using_delete_with_http_info(client_registration_template_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_client_registration_template_using_delete_with_http_info(client_registration_template_id, **kwargs) # noqa: E501 + return data + + def delete_client_registration_template_using_delete_with_http_info(self, client_registration_template_id, **kwargs): # noqa: E501 + """deleteClientRegistrationTemplate # 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_client_registration_template_using_delete_with_http_info(client_registration_template_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str client_registration_template_id: clientRegistrationTemplateId (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['client_registration_template_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_client_registration_template_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'client_registration_template_id' is set + if ('client_registration_template_id' not in params or + params['client_registration_template_id'] is None): + raise ValueError("Missing the required parameter `client_registration_template_id` when calling `delete_client_registration_template_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'client_registration_template_id' in params: + path_params['clientRegistrationTemplateId'] = params['client_registration_template_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/oauth2/config/template/{clientRegistrationTemplateId}', '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_client_registration_templates_using_get(self, **kwargs): # noqa: E501 + """getClientRegistrationTemplates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_client_registration_templates_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[OAuth2ClientRegistrationTemplate] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_client_registration_templates_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_client_registration_templates_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_client_registration_templates_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getClientRegistrationTemplates # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_client_registration_templates_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[OAuth2ClientRegistrationTemplate] + 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_client_registration_templates_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/oauth2/config/template', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OAuth2ClientRegistrationTemplate]', # 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_client_registration_template_using_post(self, body, **kwargs): # noqa: E501 + """saveClientRegistrationTemplate # 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_client_registration_template_using_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param OAuth2ClientRegistrationTemplate body: clientRegistrationTemplate (required) + :return: OAuth2ClientRegistrationTemplate + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_client_registration_template_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.save_client_registration_template_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def save_client_registration_template_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveClientRegistrationTemplate # 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_client_registration_template_using_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param OAuth2ClientRegistrationTemplate body: clientRegistrationTemplate (required) + :return: OAuth2ClientRegistrationTemplate + 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_client_registration_template_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_client_registration_template_using_post`") # noqa: E501 + + 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( + ['*/*']) # 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/oauth2/config/template', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OAuth2ClientRegistrationTemplate', # 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_controller_api.py b/tb_rest_client/api/api_ce/o_auth_2_controller_api.py new file mode 100644 index 00000000..ef74d3de --- /dev/null +++ b/tb_rest_client/api/api_ce/o_auth_2_controller_api.py @@ -0,0 +1,393 @@ +# 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 +""" + +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 OAuth2ControllerApi(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_current_o_auth2_info_using_get(self, **kwargs): # noqa: E501 + """getCurrentOAuth2Info # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_current_o_auth2_info_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: OAuth2Info + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_current_o_auth2_info_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_current_o_auth2_info_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_current_o_auth2_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getCurrentOAuth2Info # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_current_o_auth2_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: OAuth2Info + 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_current_o_auth2_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/oauth2/config', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OAuth2Info', # 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_processing_url_using_get(self, **kwargs): # noqa: E501 + """getLoginProcessingUrl # noqa: 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_processing_url_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_login_processing_url_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_login_processing_url_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_login_processing_url_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getLoginProcessingUrl # noqa: 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_processing_url_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_login_processing_url_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/oauth2/loginProcessingUrl', '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 get_o_auth2_clients_using_post(self, **kwargs): # noqa: E501 + """getOAuth2Clients # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_o_auth2_clients_using_post(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str pkg_name: pkgName + :param str platform: platform + :return: list[OAuth2ClientInfo] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_o_auth2_clients_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_o_auth2_clients_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def get_o_auth2_clients_using_post_with_http_info(self, **kwargs): # noqa: E501 + """getOAuth2Clients # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_o_auth2_clients_using_post_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str pkg_name: pkgName + :param str platform: platform + :return: list[OAuth2ClientInfo] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['pkg_name', 'platform'] # 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_o_auth2_clients_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'pkg_name' in params: + query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 + if 'platform' in params: + query_params.append(('platform', params['platform'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/noauth/oauth2Clients{?pkgName,platform}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OAuth2ClientInfo]', # 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_o_auth2_info_using_post(self, body, **kwargs): # noqa: E501 + """saveOAuth2Info # 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_o_auth2_info_using_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param OAuth2Info body: oauth2Info (required) + :return: OAuth2Info + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_o_auth2_info_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.save_o_auth2_info_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def save_o_auth2_info_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveOAuth2Info # 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_o_auth2_info_using_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param OAuth2Info body: oauth2Info (required) + :return: OAuth2Info + 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_o_auth2_info_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_o_auth2_info_using_post`") # noqa: E501 + + 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( + ['*/*']) # 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/oauth2/config', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OAuth2Info', # 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/ota_package_controller_api.py b/tb_rest_client/api/api_ce/ota_package_controller_api.py index 86f3715c..8fe8c0f4 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 @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -85,8 +84,8 @@ def delete_ota_package_using_delete_with_http_info(self, ota_package_id, **kwarg params[key] = val del params['kwargs'] # verify the required parameter 'ota_package_id' is set - if self.api_client.client_side_validation and ('ota_package_id' not in params or - params['ota_package_id'] is None): # noqa: E501 + if ('ota_package_id' not in params or + params['ota_package_id'] is None): raise ValueError("Missing the required parameter `ota_package_id` when calling `delete_ota_package_using_delete`") # noqa: E501 collection_formats = {} @@ -103,14 +102,6 @@ def delete_ota_package_using_delete_with_http_info(self, ota_package_id, **kwarg local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -182,8 +173,8 @@ def download_ota_package_using_get_with_http_info(self, ota_package_id, **kwargs params[key] = val del params['kwargs'] # verify the required parameter 'ota_package_id' is set - if self.api_client.client_side_validation and ('ota_package_id' not in params or - params['ota_package_id'] is None): # noqa: E501 + if ('ota_package_id' not in params or + params['ota_package_id'] is None): raise ValueError("Missing the required parameter `ota_package_id` when calling `download_ota_package_using_get`") # noqa: E501 collection_formats = {} @@ -204,10 +195,6 @@ def download_ota_package_using_get_with_http_info(self, ota_package_id, **kwargs header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -279,8 +266,8 @@ def get_ota_package_by_id_using_get_with_http_info(self, ota_package_id, **kwarg params[key] = val del params['kwargs'] # verify the required parameter 'ota_package_id' is set - if self.api_client.client_side_validation and ('ota_package_id' not in params or - params['ota_package_id'] is None): # noqa: E501 + if ('ota_package_id' not in params or + params['ota_package_id'] is None): raise ValueError("Missing the required parameter `ota_package_id` when calling `get_ota_package_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -301,10 +288,6 @@ def get_ota_package_by_id_using_get_with_http_info(self, ota_package_id, **kwarg header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -376,8 +359,8 @@ def get_ota_package_info_by_id_using_get_with_http_info(self, ota_package_id, ** params[key] = val del params['kwargs'] # verify the required parameter 'ota_package_id' is set - if self.api_client.client_side_validation and ('ota_package_id' not in params or - params['ota_package_id'] is None): # noqa: E501 + if ('ota_package_id' not in params or + params['ota_package_id'] is None): raise ValueError("Missing the required parameter `ota_package_id` when calling `get_ota_package_info_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -398,10 +381,6 @@ def get_ota_package_info_by_id_using_get_with_http_info(self, ota_package_id, ** header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -485,20 +464,20 @@ def get_ota_packages_using_get_with_http_info(self, device_profile_id, type, pag params[key] = val del params['kwargs'] # verify the required parameter 'device_profile_id' is set - if self.api_client.client_side_validation and ('device_profile_id' not in params or - params['device_profile_id'] is None): # noqa: E501 + if ('device_profile_id' not in params or + params['device_profile_id'] is None): raise ValueError("Missing the required parameter `device_profile_id` when calling `get_ota_packages_using_get`") # noqa: E501 # verify the required parameter 'type' is set - if self.api_client.client_side_validation and ('type' not in params or - params['type'] is None): # noqa: E501 + if ('type' not in params or + params['type'] is None): raise ValueError("Missing the required parameter `type` when calling `get_ota_packages_using_get`") # noqa: E501 # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_ota_packages_using_get`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_ota_packages_using_get`") # noqa: E501 collection_formats = {} @@ -531,10 +510,6 @@ def get_ota_packages_using_get_with_http_info(self, device_profile_id, type, pag header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -614,12 +589,12 @@ def get_ota_packages_using_get1_with_http_info(self, page_size, page, **kwargs): params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_ota_packages_using_get1`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_ota_packages_using_get1`") # noqa: E501 collection_formats = {} @@ -648,10 +623,6 @@ def get_ota_packages_using_get1_with_http_info(self, page_size, page, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -671,18 +642,18 @@ def get_ota_packages_using_get1_with_http_info(self, page_size, page, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_ota_package_data_using_post(self, ota_package_id, checksum_algorithm, file, **kwargs): # noqa: E501 + def save_ota_package_data_using_post(self, file, checksum_algorithm, ota_package_id, **kwargs): # noqa: E501 """saveOtaPackageData # 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(ota_package_id, checksum_algorithm, file, async_req=True) + >>> thread = api.save_ota_package_data_using_post(file, checksum_algorithm, ota_package_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str ota_package_id: otaPackageId (required) + :param str file: (required) :param str checksum_algorithm: checksumAlgorithm (required) - :param file file: file (required) + :param str ota_package_id: otaPackageId (required) :param str checksum: checksum :return: OtaPackageInfo If the method is called asynchronously, @@ -690,30 +661,30 @@ def save_ota_package_data_using_post(self, ota_package_id, checksum_algorithm, f """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_ota_package_data_using_post_with_http_info(ota_package_id, checksum_algorithm, file, **kwargs) # noqa: E501 + return self.save_ota_package_data_using_post_with_http_info(file, checksum_algorithm, ota_package_id, **kwargs) # noqa: E501 else: - (data) = self.save_ota_package_data_using_post_with_http_info(ota_package_id, checksum_algorithm, file, **kwargs) # noqa: E501 + (data) = self.save_ota_package_data_using_post_with_http_info(file, checksum_algorithm, ota_package_id, **kwargs) # noqa: E501 return data - def save_ota_package_data_using_post_with_http_info(self, ota_package_id, checksum_algorithm, file, **kwargs): # noqa: E501 + def save_ota_package_data_using_post_with_http_info(self, file, checksum_algorithm, ota_package_id, **kwargs): # noqa: E501 """saveOtaPackageData # 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(ota_package_id, checksum_algorithm, file, async_req=True) + >>> thread = api.save_ota_package_data_using_post_with_http_info(file, checksum_algorithm, ota_package_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str ota_package_id: otaPackageId (required) + :param str file: (required) :param str checksum_algorithm: checksumAlgorithm (required) - :param file file: file (required) + :param str ota_package_id: otaPackageId (required) :param str checksum: checksum :return: OtaPackageInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['ota_package_id', 'checksum_algorithm', 'file', 'checksum'] # noqa: E501 + all_params = ['file', 'checksum_algorithm', 'ota_package_id', 'checksum'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -728,18 +699,18 @@ def save_ota_package_data_using_post_with_http_info(self, ota_package_id, checks ) params[key] = val del params['kwargs'] - # verify the required parameter 'ota_package_id' is set - if self.api_client.client_side_validation and ('ota_package_id' not in params or - params['ota_package_id'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `ota_package_id` when calling `save_ota_package_data_using_post`") # noqa: E501 - # verify the required parameter 'checksum_algorithm' is set - if self.api_client.client_side_validation and ('checksum_algorithm' not in params or - params['checksum_algorithm'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `checksum_algorithm` when calling `save_ota_package_data_using_post`") # noqa: E501 # verify the required parameter 'file' is set - if self.api_client.client_side_validation and ('file' not in params or - params['file'] is None): # noqa: E501 + if ('file' not in params or + params['file'] is None): raise ValueError("Missing the required parameter `file` when calling `save_ota_package_data_using_post`") # noqa: E501 + # 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): + raise ValueError("Missing the required parameter `ota_package_id` when calling `save_ota_package_data_using_post`") # noqa: E501 collection_formats = {} @@ -788,43 +759,43 @@ def save_ota_package_data_using_post_with_http_info(self, ota_package_id, checks _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_ota_package_info_using_post(self, ota_package_info, **kwargs): # noqa: E501 + def save_ota_package_info_using_post(self, body, **kwargs): # noqa: E501 """saveOtaPackageInfo # 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_info_using_post(ota_package_info, async_req=True) + >>> thread = api.save_ota_package_info_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param SaveOtaPackageInfoRequest ota_package_info: otaPackageInfo (required) + :param SaveOtaPackageInfoRequest body: otaPackageInfo (required) :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_info_using_post_with_http_info(ota_package_info, **kwargs) # noqa: E501 + return self.save_ota_package_info_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_ota_package_info_using_post_with_http_info(ota_package_info, **kwargs) # noqa: E501 + (data) = self.save_ota_package_info_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_ota_package_info_using_post_with_http_info(self, ota_package_info, **kwargs): # noqa: E501 + def save_ota_package_info_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveOtaPackageInfo # 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_info_using_post_with_http_info(ota_package_info, async_req=True) + >>> thread = api.save_ota_package_info_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param SaveOtaPackageInfoRequest ota_package_info: otaPackageInfo (required) + :param SaveOtaPackageInfoRequest body: otaPackageInfo (required) :return: OtaPackageInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['ota_package_info'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -839,10 +810,10 @@ def save_ota_package_info_using_post_with_http_info(self, ota_package_info, **kw ) params[key] = val del params['kwargs'] - # verify the required parameter 'ota_package_info' is set - if self.api_client.client_side_validation and ('ota_package_info' not in params or - params['ota_package_info'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `ota_package_info` when calling `save_ota_package_info_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_ota_package_info_using_post`") # noqa: E501 collection_formats = {} @@ -856,8 +827,8 @@ def save_ota_package_info_using_post_with_http_info(self, ota_package_info, **kw local_var_files = {} body_params = None - if 'ota_package_info' in params: - body_params = params['ota_package_info'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -883,4 +854,4 @@ def save_ota_package_info_using_post_with_http_info(self, ota_package_info, **kw _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_ce/queue_controller_api.py b/tb_rest_client/api/api_ce/queue_controller_api.py index af22d38c..3f12b1c2 100644 --- a/tb_rest_client/api/api_ce/queue_controller_api.py +++ b/tb_rest_client/api/api_ce/queue_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class QueueControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def get_tenant_queues_by_service_type_using_get(self, service_type, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_queues_by_service_type_using_get(service_type, async_req=True) + >>> thread = api.get_tenant_queues_by_service_type_using_get(service_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +58,7 @@ def get_tenant_queues_by_service_type_using_get_with_http_info(self, service_typ This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.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, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,7 +76,11 @@ def get_tenant_queues_by_service_type_using_get_with_http_info(self, service_typ 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 @@ -104,10 +106,6 @@ def get_tenant_queues_by_service_type_using_get_with_http_info(self, service_typ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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_ce/rpc_v_1_controller_api.py b/tb_rest_client/api/api_ce/rpc_v_1_controller_api.py new file mode 100644 index 00000000..8cd4ab56 --- /dev/null +++ b/tb_rest_client/api/api_ce/rpc_v_1_controller_api.py @@ -0,0 +1,243 @@ +# 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 +""" + +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 RpcV1ControllerApi(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 handle_one_way_device_rpc_request_using_post(self, body, device_id, **kwargs): # noqa: E501 + """handleOneWayDeviceRPCRequest # 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_one_way_device_rpc_request_using_post(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (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.handle_one_way_device_rpc_request_using_post_with_http_info(body, device_id, **kwargs) # noqa: E501 + else: + (data) = self.handle_one_way_device_rpc_request_using_post_with_http_info(body, device_id, **kwargs) # noqa: E501 + return data + + def handle_one_way_device_rpc_request_using_post_with_http_info(self, body, device_id, **kwargs): # noqa: E501 + """handleOneWayDeviceRPCRequest # 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_one_way_device_rpc_request_using_post_with_http_info(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (required) + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', '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 handle_one_way_device_rpc_request_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `handle_one_way_device_rpc_request_using_post`") # noqa: E501 + # 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 `handle_one_way_device_rpc_request_using_post`") # 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 + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # 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/plugins/rpc/oneway/{deviceId}', '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_two_way_device_rpc_request_using_post(self, body, device_id, **kwargs): # noqa: E501 + """handleTwoWayDeviceRPCRequest # 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_two_way_device_rpc_request_using_post(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (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.handle_two_way_device_rpc_request_using_post_with_http_info(body, device_id, **kwargs) # noqa: E501 + else: + (data) = self.handle_two_way_device_rpc_request_using_post_with_http_info(body, device_id, **kwargs) # noqa: E501 + return data + + def handle_two_way_device_rpc_request_using_post_with_http_info(self, body, device_id, **kwargs): # noqa: E501 + """handleTwoWayDeviceRPCRequest # 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_two_way_device_rpc_request_using_post_with_http_info(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (required) + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', '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 handle_two_way_device_rpc_request_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `handle_two_way_device_rpc_request_using_post`") # noqa: E501 + # 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 `handle_two_way_device_rpc_request_using_post`") # 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 + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # 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/plugins/rpc/twoway/{deviceId}', '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) 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 new file mode 100644 index 00000000..812babde --- /dev/null +++ b/tb_rest_client/api/api_ce/rpc_v_2_controller_api.py @@ -0,0 +1,554 @@ +# 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 +""" + +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 RpcV2ControllerApi(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_resource_using_delete(self, rpc_id, **kwargs): # noqa: E501 + """deleteResource # 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: rpcId (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 + """deleteResource # 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: rpcId (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 + # 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 get_persisted_rpc_by_device_using_get(self, device_id, page_size, page, rpc_status, **kwargs): # noqa: E501 + """getPersistedRpcByDevice # noqa: 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) + >>> result = thread.get() + + :param async_req bool + :param str device_id: deviceId (required) + :param int page_size: pageSize (required) + :param int page: page (required) + :param str rpc_status: rpcStatus (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataRpc + If the method is called asynchronously, + returns the request thread. + """ + 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 + else: + (data) = self.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, rpc_status, **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 + """getPersistedRpcByDevice # noqa: 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) + >>> result = thread.get() + + :param async_req bool + :param str device_id: deviceId (required) + :param int page_size: pageSize (required) + :param int page: page (required) + :param str rpc_status: rpcStatus (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataRpc + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_id', 'page_size', 'page', 'rpc_status', '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_persisted_rpc_by_device_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_persisted_rpc_by_device_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_persisted_rpc_by_device_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_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 = {} + + path_params = {} + if 'device_id' in params: + path_params['deviceId'] = params['device_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 'rpc_status' in params: + query_params.append(('rpcStatus', params['rpc_status'])) # 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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/rpc/persistent/device/{deviceId}{?pageSize,page,rpcStatus,textSearch,sortProperty,sortOrder}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataRpc', # 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_persisted_rpc_using_get(self, rpc_id, **kwargs): # noqa: E501 + """getPersistedRpc # noqa: 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_using_get(rpc_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str rpc_id: rpcId (required) + :return: Rpc + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_persisted_rpc_using_get_with_http_info(rpc_id, **kwargs) # noqa: E501 + else: + (data) = self.get_persisted_rpc_using_get_with_http_info(rpc_id, **kwargs) # noqa: E501 + return data + + def get_persisted_rpc_using_get_with_http_info(self, rpc_id, **kwargs): # noqa: E501 + """getPersistedRpc # noqa: 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_using_get_with_http_info(rpc_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str rpc_id: rpcId (required) + :return: Rpc + 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 get_persisted_rpc_using_get" % 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 `get_persisted_rpc_using_get`") # 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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/rpc/persistent/{rpcId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Rpc', # 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_one_way_device_rpc_request_using_post1(self, body, device_id, **kwargs): # noqa: E501 + """handleOneWayDeviceRPCRequest # 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_one_way_device_rpc_request_using_post1(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (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.handle_one_way_device_rpc_request_using_post1_with_http_info(body, device_id, **kwargs) # noqa: E501 + else: + (data) = self.handle_one_way_device_rpc_request_using_post1_with_http_info(body, device_id, **kwargs) # noqa: E501 + return data + + def handle_one_way_device_rpc_request_using_post1_with_http_info(self, body, device_id, **kwargs): # noqa: E501 + """handleOneWayDeviceRPCRequest # 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_one_way_device_rpc_request_using_post1_with_http_info(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (required) + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', '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 handle_one_way_device_rpc_request_using_post1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `handle_one_way_device_rpc_request_using_post1`") # noqa: E501 + # 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 `handle_one_way_device_rpc_request_using_post1`") # 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 + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # 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/rpc/oneway/{deviceId}', '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_two_way_device_rpc_request_using_post1(self, body, device_id, **kwargs): # noqa: E501 + """handleTwoWayDeviceRPCRequest # 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_two_way_device_rpc_request_using_post1(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (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.handle_two_way_device_rpc_request_using_post1_with_http_info(body, device_id, **kwargs) # noqa: E501 + else: + (data) = self.handle_two_way_device_rpc_request_using_post1_with_http_info(body, device_id, **kwargs) # noqa: E501 + return data + + def handle_two_way_device_rpc_request_using_post1_with_http_info(self, body, device_id, **kwargs): # noqa: E501 + """handleTwoWayDeviceRPCRequest # 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_two_way_device_rpc_request_using_post1_with_http_info(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (required) + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', '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 handle_two_way_device_rpc_request_using_post1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `handle_two_way_device_rpc_request_using_post1`") # noqa: E501 + # 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 `handle_two_way_device_rpc_request_using_post1`") # 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 + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # 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/rpc/twoway/{deviceId}', '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) 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 73d80eef..27b3d27a 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class RuleChainControllerApi(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 """ @@ -34,43 +32,45 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def delete_rule_chain_using_delete(self, rule_chain_id, **kwargs): # noqa: E501 - """deleteRuleChain # noqa: E501 + def assign_rule_chain_to_edge_using_post(self, edge_id, rule_chain_id, **kwargs): # noqa: E501 + """assignRuleChainToEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_rule_chain_using_delete(rule_chain_id, async_req=True) + >>> thread = api.assign_rule_chain_to_edge_using_post(edge_id, rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool + :param str edge_id: edgeId (required) :param str rule_chain_id: ruleChainId (required) - :return: None + :return: RuleChain If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_rule_chain_using_delete_with_http_info(rule_chain_id, **kwargs) # noqa: E501 + return self.assign_rule_chain_to_edge_using_post_with_http_info(edge_id, rule_chain_id, **kwargs) # noqa: E501 else: - (data) = self.delete_rule_chain_using_delete_with_http_info(rule_chain_id, **kwargs) # noqa: E501 + (data) = self.assign_rule_chain_to_edge_using_post_with_http_info(edge_id, rule_chain_id, **kwargs) # noqa: E501 return data - def delete_rule_chain_using_delete_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 - """deleteRuleChain # noqa: E501 + def assign_rule_chain_to_edge_using_post_with_http_info(self, edge_id, rule_chain_id, **kwargs): # noqa: E501 + """assignRuleChainToEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_rule_chain_using_delete_with_http_info(rule_chain_id, async_req=True) + >>> thread = api.assign_rule_chain_to_edge_using_post_with_http_info(edge_id, rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool + :param str edge_id: edgeId (required) :param str rule_chain_id: ruleChainId (required) - :return: None + :return: RuleChain If the method is called asynchronously, returns the request thread. """ - all_params = ['rule_chain_id'] # noqa: E501 + all_params = ['edge_id', 'rule_chain_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -78,17 +78,27 @@ def delete_rule_chain_using_delete_with_http_info(self, rule_chain_id, **kwargs) 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_rule_chain_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 `assign_rule_chain_to_edge_using_post`") # noqa: E501 # 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 `delete_rule_chain_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `rule_chain_id` when calling `assign_rule_chain_to_edge_using_post`") # noqa: E501 collection_formats = {} path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 if 'rule_chain_id' in params: path_params['ruleChainId'] = params['rule_chain_id'] # noqa: E501 @@ -104,22 +114,18 @@ def delete_rule_chain_using_delete_with_http_info(self, rule_chain_id, **kwargs) header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/ruleChain/{ruleChainId}', 'DELETE', + '/api/edge/{edgeId}/ruleChain/{ruleChainId}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='RuleChain', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -127,44 +133,43 @@ def delete_rule_chain_using_delete_with_http_info(self, rule_chain_id, **kwargs) _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_latest_rule_node_debug_input_using_get(self, rule_node_id, **kwargs): # noqa: E501 - """getLatestRuleNodeDebugInput # noqa: E501 + def delete_rule_chain_using_delete(self, rule_chain_id, **kwargs): # noqa: E501 + """deleteRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_latest_rule_node_debug_input_using_get(rule_node_id, async_req=True) + >>> thread = api.delete_rule_chain_using_delete(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str rule_node_id: ruleNodeId (required) - :return: str + :param str rule_chain_id: ruleChainId (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_latest_rule_node_debug_input_using_get_with_http_info(rule_node_id, **kwargs) # noqa: E501 + return self.delete_rule_chain_using_delete_with_http_info(rule_chain_id, **kwargs) # noqa: E501 else: - (data) = self.get_latest_rule_node_debug_input_using_get_with_http_info(rule_node_id, - **kwargs) # noqa: E501 + (data) = self.delete_rule_chain_using_delete_with_http_info(rule_chain_id, **kwargs) # noqa: E501 return data - def get_latest_rule_node_debug_input_using_get_with_http_info(self, rule_node_id, **kwargs): # noqa: E501 - """getLatestRuleNodeDebugInput # noqa: E501 + def delete_rule_chain_using_delete_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 + """deleteRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_latest_rule_node_debug_input_using_get_with_http_info(rule_node_id, async_req=True) + >>> thread = api.delete_rule_chain_using_delete_with_http_info(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str rule_node_id: ruleNodeId (required) - :return: str + :param str rule_chain_id: ruleChainId (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['rule_node_id'] # noqa: E501 + all_params = ['rule_chain_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -172,19 +177,23 @@ def get_latest_rule_node_debug_input_using_get_with_http_info(self, rule_node_id 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_rule_chain_using_delete" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'rule_node_id' is set - if ('rule_node_id' not in params or - params['rule_node_id'] is None): - raise ValueError( - "Missing the required parameter `rule_node_id` when calling `get_latest_rule_node_debug_input_using_get`") # noqa: E501 + # 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 `delete_rule_chain_using_delete`") # noqa: E501 collection_formats = {} path_params = {} - if 'rule_node_id' in params: - path_params['ruleNodeId'] = params['rule_node_id'] # noqa: E501 + if 'rule_chain_id' in params: + path_params['ruleChainId'] = params['rule_chain_id'] # noqa: E501 query_params = [] @@ -194,26 +203,18 @@ def get_latest_rule_node_debug_input_using_get_with_http_info(self, rule_node_id local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/ruleNode/{ruleNodeId}/debugIn', 'GET', + '/api/ruleChain/{ruleChainId}', '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'), @@ -221,43 +222,43 @@ def get_latest_rule_node_debug_input_using_get_with_http_info(self, rule_node_id _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_rule_chain_by_id_using_get(self, rule_chain_id, **kwargs): # noqa: E501 - """getRuleChainById # noqa: E501 + def export_rule_chains_using_get(self, limit, **kwargs): # noqa: E501 + """exportRuleChains # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_rule_chain_by_id_using_get(rule_chain_id, async_req=True) + >>> thread = api.export_rule_chains_using_get(limit, async_req=True) >>> result = thread.get() :param async_req bool - :param str rule_chain_id: ruleChainId (required) - :return: RuleChain + :param str limit: limit (required) + :return: RuleChainData 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_by_id_using_get_with_http_info(rule_chain_id, **kwargs) # noqa: E501 + return self.export_rule_chains_using_get_with_http_info(limit, **kwargs) # noqa: E501 else: - (data) = self.get_rule_chain_by_id_using_get_with_http_info(rule_chain_id, **kwargs) # noqa: E501 + (data) = self.export_rule_chains_using_get_with_http_info(limit, **kwargs) # noqa: E501 return data - def get_rule_chain_by_id_using_get_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 - """getRuleChainById # noqa: E501 + def export_rule_chains_using_get_with_http_info(self, limit, **kwargs): # noqa: E501 + """exportRuleChains # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_rule_chain_by_id_using_get_with_http_info(rule_chain_id, async_req=True) + >>> thread = api.export_rule_chains_using_get_with_http_info(limit, async_req=True) >>> result = thread.get() :param async_req bool - :param str rule_chain_id: ruleChainId (required) - :return: RuleChain + :param str limit: limit (required) + :return: RuleChainData If the method is called asynchronously, returns the request thread. """ - all_params = ['rule_chain_id'] # noqa: E501 + all_params = ['limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -265,21 +266,25 @@ def get_rule_chain_by_id_using_get_with_http_info(self, rule_chain_id, **kwargs) 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 export_rule_chains_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_by_id_using_get`") # noqa: E501 + # verify the required parameter 'limit' is set + if ('limit' not in params or + params['limit'] is None): + raise ValueError("Missing the required parameter `limit` when calling `export_rule_chains_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 = [] + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -291,22 +296,18 @@ def get_rule_chain_by_id_using_get_with_http_info(self, rule_chain_id, **kwargs) header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/ruleChain/{ruleChainId}', 'GET', + '/api/ruleChains/export{?limit}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='RuleChain', # noqa: E501 + response_type='RuleChainData', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -314,43 +315,41 @@ def get_rule_chain_by_id_using_get_with_http_info(self, rule_chain_id, **kwargs) _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_rule_chain_meta_data_using_get(self, rule_chain_id, **kwargs): # noqa: E501 - """getRuleChainMetaData # noqa: E501 + def get_auto_assign_to_edge_rule_chains_using_get(self, **kwargs): # noqa: E501 + """getAutoAssignToEdgeRuleChains # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_rule_chain_meta_data_using_get(rule_chain_id, async_req=True) + >>> thread = api.get_auto_assign_to_edge_rule_chains_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param str rule_chain_id: ruleChainId (required) - :return: RuleChainMetaData + :return: list[RuleChain] 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_meta_data_using_get_with_http_info(rule_chain_id, **kwargs) # noqa: E501 + return self.get_auto_assign_to_edge_rule_chains_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_rule_chain_meta_data_using_get_with_http_info(rule_chain_id, **kwargs) # noqa: E501 + (data) = self.get_auto_assign_to_edge_rule_chains_using_get_with_http_info(**kwargs) # noqa: E501 return data - def get_rule_chain_meta_data_using_get_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 - """getRuleChainMetaData # noqa: E501 + def get_auto_assign_to_edge_rule_chains_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getAutoAssignToEdgeRuleChains # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_rule_chain_meta_data_using_get_with_http_info(rule_chain_id, async_req=True) + >>> thread = api.get_auto_assign_to_edge_rule_chains_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str rule_chain_id: ruleChainId (required) - :return: RuleChainMetaData + :return: list[RuleChain] If the method is called asynchronously, returns the request thread. """ - all_params = ['rule_chain_id'] # noqa: E501 + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -358,19 +357,17 @@ def get_rule_chain_meta_data_using_get_with_http_info(self, rule_chain_id, **kwa 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_auto_assign_to_edge_rule_chains_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_meta_data_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 = [] @@ -384,22 +381,18 @@ def get_rule_chain_meta_data_using_get_with_http_info(self, rule_chain_id, **kwa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/ruleChain/{ruleChainId}/metadata', 'GET', + '/api/ruleChain/autoAssignToEdgeRuleChains', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='RuleChainMetaData', # noqa: E501 + response_type='list[RuleChain]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -407,51 +400,53 @@ 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_chains_using_get(self, page_size, page, **kwargs): # noqa: E501 - """getRuleChains # noqa: E501 + def get_edge_rule_chains_using_get(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """getEdgeRuleChains # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_rule_chains_using_get(page_size, page, async_req=True) + >>> thread = api.get_edge_rule_chains_using_get(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataRuleChain + :return: PageDataRuleChain 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_chains_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.get_edge_rule_chains_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_rule_chains_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.get_edge_rule_chains_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 return data - def get_rule_chains_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """getRuleChains # noqa: E501 + def get_edge_rule_chains_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """getEdgeRuleChains # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_rule_chains_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_edge_rule_chains_using_get_with_http_info(edge_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataRuleChain + :return: PageDataRuleChain If the method is called asynchronously, returns the request thread. """ - all_params = ['text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # 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') @@ -459,22 +454,31 @@ def get_rule_chains_using_get_with_http_info(self, page_size, page, **kwargs): 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_rule_chains_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_rule_chains_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_rule_chains_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_edge_rule_chains_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_rule_chains_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_edge_rule_chains_using_get`") # noqa: E501 collection_formats = {} path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 query_params = [] if 'text_search' in params: @@ -498,22 +502,18 @@ def get_rule_chains_using_get_with_http_info(self, page_size, page, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/ruleChains{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/edge/{edgeId}/ruleChains{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataRuleChain', # noqa: E501 + response_type='PageDataRuleChain', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -521,45 +521,43 @@ def get_rule_chains_using_get_with_http_info(self, page_size, page, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_rule_chain_meta_data_using_post(self, rule_chain_meta_data, **kwargs): # noqa: E501 - """saveRuleChainMetaData # noqa: E501 + def get_latest_rule_node_debug_input_using_get(self, rule_node_id, **kwargs): # noqa: E501 + """getLatestRuleNodeDebugInput # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_rule_chain_meta_data_using_post(rule_chain_meta_data, async_req=True) + >>> thread = api.get_latest_rule_node_debug_input_using_get(rule_node_id, async_req=True) >>> result = thread.get() :param async_req bool - :param RuleChainMetaData rule_chain_meta_data: ruleChainMetaData (required) - :return: RuleChainMetaData + :param str rule_node_id: ruleNodeId (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.save_rule_chain_meta_data_using_post_with_http_info(rule_chain_meta_data, - **kwargs) # noqa: E501 + return self.get_latest_rule_node_debug_input_using_get_with_http_info(rule_node_id, **kwargs) # noqa: E501 else: - (data) = self.save_rule_chain_meta_data_using_post_with_http_info(rule_chain_meta_data, - **kwargs) # noqa: E501 + (data) = self.get_latest_rule_node_debug_input_using_get_with_http_info(rule_node_id, **kwargs) # noqa: E501 return data - def save_rule_chain_meta_data_using_post_with_http_info(self, rule_chain_meta_data, **kwargs): # noqa: E501 - """saveRuleChainMetaData # noqa: E501 + def get_latest_rule_node_debug_input_using_get_with_http_info(self, rule_node_id, **kwargs): # noqa: E501 + """getLatestRuleNodeDebugInput # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_rule_chain_meta_data_using_post_with_http_info(rule_chain_meta_data, async_req=True) + >>> thread = api.get_latest_rule_node_debug_input_using_get_with_http_info(rule_node_id, async_req=True) >>> result = thread.get() :param async_req bool - :param RuleChainMetaData rule_chain_meta_data: ruleChainMetaData (required) - :return: RuleChainMetaData + :param str rule_node_id: ruleNodeId (required) + :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['rule_chain_meta_data'] # noqa: E501 + all_params = ['rule_node_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -567,17 +565,23 @@ def save_rule_chain_meta_data_using_post_with_http_info(self, rule_chain_meta_da 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_latest_rule_node_debug_input_using_get" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'rule_chain_meta_data' is set - if ('rule_chain_meta_data' not in params or - params['rule_chain_meta_data'] is None): - raise ValueError( - "Missing the required parameter `rule_chain_meta_data` when calling `save_rule_chain_meta_data_using_post`") # noqa: E501 + # verify the required parameter 'rule_node_id' is set + if ('rule_node_id' not in params or + params['rule_node_id'] is None): + raise ValueError("Missing the required parameter `rule_node_id` when calling `get_latest_rule_node_debug_input_using_get`") # noqa: E501 collection_formats = {} path_params = {} + if 'rule_node_id' in params: + path_params['ruleNodeId'] = params['rule_node_id'] # noqa: E501 query_params = [] @@ -587,28 +591,22 @@ def save_rule_chain_meta_data_using_post_with_http_info(self, rule_chain_meta_da local_var_files = {} body_params = None - if 'rule_chain_meta_data' in params: - body_params = params['rule_chain_meta_data'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/ruleChain/metadata', 'POST', + '/api/ruleNode/{ruleNodeId}/debugIn', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='RuleChainMetaData', # 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'), @@ -616,43 +614,43 @@ def save_rule_chain_meta_data_using_post_with_http_info(self, rule_chain_meta_da _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_rule_chain_using_post(self, rule_chain, **kwargs): # noqa: E501 - """saveRuleChain # noqa: E501 + def get_rule_chain_by_id_using_get(self, rule_chain_id, **kwargs): # noqa: E501 + """getRuleChainById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_rule_chain_using_post(rule_chain, async_req=True) + >>> thread = api.get_rule_chain_by_id_using_get(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :param RuleChain rule_chain: ruleChain (required) + :param str rule_chain_id: ruleChainId (required) :return: RuleChain If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_rule_chain_using_post_with_http_info(rule_chain, **kwargs) # noqa: E501 + return self.get_rule_chain_by_id_using_get_with_http_info(rule_chain_id, **kwargs) # noqa: E501 else: - (data) = self.save_rule_chain_using_post_with_http_info(rule_chain, **kwargs) # noqa: E501 + (data) = self.get_rule_chain_by_id_using_get_with_http_info(rule_chain_id, **kwargs) # noqa: E501 return data - def save_rule_chain_using_post_with_http_info(self, rule_chain, **kwargs): # noqa: E501 - """saveRuleChain # noqa: E501 + def get_rule_chain_by_id_using_get_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 + """getRuleChainById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_rule_chain_using_post_with_http_info(rule_chain, async_req=True) + >>> thread = api.get_rule_chain_by_id_using_get_with_http_info(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :param RuleChain rule_chain: ruleChain (required) + :param str rule_chain_id: ruleChainId (required) :return: RuleChain If the method is called asynchronously, returns the request thread. """ - all_params = ['rule_chain'] # noqa: E501 + all_params = ['rule_chain_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -660,17 +658,23 @@ def save_rule_chain_using_post_with_http_info(self, rule_chain, **kwargs): # no 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_by_id_using_get" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'rule_chain' is set - if ('rule_chain' not in params or - params['rule_chain'] is None): - raise ValueError( - "Missing the required parameter `rule_chain` when calling `save_rule_chain_using_post`") # noqa: E501 + # 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_by_id_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 = [] @@ -680,21 +684,15 @@ def save_rule_chain_using_post_with_http_info(self, rule_chain, **kwargs): # no local_var_files = {} body_params = None - if 'rule_chain' in params: - body_params = params['rule_chain'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/ruleChain', 'POST', + '/api/ruleChain/{ruleChainId}', 'GET', path_params, query_params, header_params, @@ -709,38 +707,38 @@ def save_rule_chain_using_post_with_http_info(self, rule_chain, **kwargs): # no _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def set_root_rule_chain_using_post(self, rule_chain_id, **kwargs): # noqa: E501 - """setRootRuleChain # noqa: E501 + def get_rule_chain_meta_data_using_get(self, rule_chain_id, **kwargs): # noqa: E501 + """getRuleChainMetaData # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.set_root_rule_chain_using_post(rule_chain_id, async_req=True) + >>> thread = api.get_rule_chain_meta_data_using_get(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool :param str rule_chain_id: ruleChainId (required) - :return: RuleChain + :return: RuleChainMetaData If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.set_root_rule_chain_using_post_with_http_info(rule_chain_id, **kwargs) # noqa: E501 + return self.get_rule_chain_meta_data_using_get_with_http_info(rule_chain_id, **kwargs) # noqa: E501 else: - (data) = self.set_root_rule_chain_using_post_with_http_info(rule_chain_id, **kwargs) # noqa: E501 + (data) = self.get_rule_chain_meta_data_using_get_with_http_info(rule_chain_id, **kwargs) # noqa: E501 return data - def set_root_rule_chain_using_post_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 - """setRootRuleChain # noqa: E501 + def get_rule_chain_meta_data_using_get_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 + """getRuleChainMetaData # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.set_root_rule_chain_using_post_with_http_info(rule_chain_id, async_req=True) + >>> thread = api.get_rule_chain_meta_data_using_get_with_http_info(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool :param str rule_chain_id: ruleChainId (required) - :return: RuleChain + :return: RuleChainMetaData If the method is called asynchronously, returns the request thread. """ @@ -753,13 +751,17 @@ def set_root_rule_chain_using_post_with_http_info(self, rule_chain_id, **kwargs) 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_meta_data_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 `set_root_rule_chain_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `rule_chain_id` when calling `get_rule_chain_meta_data_using_get`") # noqa: E501 collection_formats = {} @@ -779,6 +781,216 @@ def set_root_rule_chain_using_post_with_http_info(self, rule_chain_id, **kwargs) header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/ruleChain/{ruleChainId}/metadata', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RuleChainMetaData', # 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 + """getRuleChains # noqa: 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_chains_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataRuleChain + 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_chains_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_rule_chains_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_rule_chains_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getRuleChains # noqa: 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_chains_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataRuleChain + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + 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_chains_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_rule_chains_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_rule_chains_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + 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 + 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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/ruleChains{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataRuleChain', # 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 import_rule_chains_using_post(self, body, **kwargs): # noqa: E501 + """importRuleChains # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.import_rule_chains_using_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param RuleChainData body: ruleChainData (required) + :param bool overwrite: overwrite + :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.import_rule_chains_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.import_rule_chains_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def import_rule_chains_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """importRuleChains # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.import_rule_chains_using_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param RuleChainData body: ruleChainData (required) + :param bool overwrite: overwrite + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'overwrite'] # 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 import_rule_chains_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `import_rule_chains_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'overwrite' in params: + query_params.append(('overwrite', params['overwrite'])) # 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 @@ -787,14 +999,14 @@ def set_root_rule_chain_using_post_with_http_info(self, rule_chain_id, **kwargs) auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/ruleChain/{ruleChainId}/root', 'POST', + '/api/ruleChains/import{?overwrite}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='RuleChain', # 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'), @@ -802,43 +1014,43 @@ def set_root_rule_chain_using_post_with_http_info(self, rule_chain_id, **kwargs) _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def test_script_using_post(self, input_params, **kwargs): # noqa: E501 - """testScript # noqa: E501 + def save_rule_chain_meta_data_using_post(self, body, **kwargs): # noqa: E501 + """saveRuleChainMetaData # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.test_script_using_post(input_params, async_req=True) + >>> thread = api.save_rule_chain_meta_data_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str input_params: inputParams (required) - :return: str + :param RuleChainMetaData body: ruleChainMetaData (required) + :return: RuleChainMetaData If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.test_script_using_post_with_http_info(input_params, **kwargs) # noqa: E501 + return self.save_rule_chain_meta_data_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.test_script_using_post_with_http_info(input_params, **kwargs) # noqa: E501 + (data) = self.save_rule_chain_meta_data_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def test_script_using_post_with_http_info(self, input_params, **kwargs): # noqa: E501 - """testScript # noqa: E501 + def save_rule_chain_meta_data_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveRuleChainMetaData # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.test_script_using_post_with_http_info(input_params, async_req=True) + >>> thread = api.save_rule_chain_meta_data_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str input_params: inputParams (required) - :return: str + :param RuleChainMetaData body: ruleChainMetaData (required) + :return: RuleChainMetaData If the method is called asynchronously, returns the request thread. """ - all_params = ['input_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') @@ -846,13 +1058,17 @@ def test_script_using_post_with_http_info(self, input_params, **kwargs): # noqa 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_rule_chain_meta_data_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'input_params' is set - if ('input_params' not in params or - params['input_params'] is None): - raise ValueError( - "Missing the required parameter `input_params` when calling `test_script_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_rule_chain_meta_data_using_post`") # noqa: E501 collection_formats = {} @@ -866,8 +1082,8 @@ def test_script_using_post_with_http_info(self, input_params, **kwargs): # noqa local_var_files = {} body_params = None - if 'input_params' in params: - body_params = params['input_params'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -880,14 +1096,14 @@ def test_script_using_post_with_http_info(self, input_params, **kwargs): # noqa auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/ruleChain/testScript', 'POST', + '/api/ruleChain/metadata', '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='RuleChainMetaData', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -895,48 +1111,43 @@ def test_script_using_post_with_http_info(self, input_params, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def unassign_rule_chain_from_edge_using_delete(self, edge_id, rule_chain_id, **kwargs): - """unassignRuleChainFromEdge # noqa: E501 + def save_rule_chain_using_post(self, body, **kwargs): # noqa: E501 + """saveRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_rule_chain_from_edge_using_delete(edge_id, rule_chain_id, async_req=True) + >>> thread = api.save_rule_chain_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str rule_chain_id: ruleChainId (required) - :return: None + :param DefaultRuleChainCreateRequest body: request (required) + :return: RuleChain If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.unassign_rule_chain_from_edge_using_delete_with_http_info(edge_id, rule_chain_id, - **kwargs) # noqa: E501 + return self.save_rule_chain_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.unassign_rule_chain_from_edge_using_delete_with_http_info(edge_id, rule_chain_id, - **kwargs) # noqa: E501 + (data) = self.save_rule_chain_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def unassign_rule_chain_from_edge_using_delete_with_http_info(self, edge_id, rule_chain_id, **kwargs): - """unassignRuleChainFromEdge # noqa: E501 + def save_rule_chain_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unassign_rule_chain_from_edge_using_delete_with_http_info(edge_id, rule_chain_id, async_req=True) + >>> thread = api.save_rule_chain_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str rule_chain_id: ruleChainId (required) - :return: None + :param DefaultRuleChainCreateRequest body: request (required) + :return: RuleChain If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'rule_chain_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') @@ -944,28 +1155,22 @@ def unassign_rule_chain_from_edge_using_delete_with_http_info(self, edge_id, rul 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_rule_chain_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 `unassign_rule_chain_from_edge_using_delete`") # noqa: E501 - # 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 `unassign_rule_chain_from_edge_using_delete`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_rule_chain_using_post`") # noqa: E501 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 - if 'rule_chain_id' in params: - path_params['ruleChainId'] = params['rule_chain_id'] # noqa: E501 - query_params = [] header_params = {} @@ -974,7 +1179,8 @@ def unassign_rule_chain_from_edge_using_delete_with_http_info(self, edge_id, rul 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( ['*/*']) # noqa: E501 @@ -987,14 +1193,14 @@ def unassign_rule_chain_from_edge_using_delete_with_http_info(self, edge_id, rul auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/{edgeId}/ruleChain/{ruleChainId}', 'DELETE', + '/api/ruleChain/device/default', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='RuleChain', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1002,48 +1208,43 @@ def unassign_rule_chain_from_edge_using_delete_with_http_info(self, edge_id, rul _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def assign_rule_chain_to_edge_using_post(self, edge_id, rule_chain_id, **kwargs): - """assignRuleChainToEdge # noqa: E501 + def save_rule_chain_using_post1(self, body, **kwargs): # noqa: E501 + """saveRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_rule_chain_to_edge_using_post(edge_id, rule_chain_id, async_req=True) + >>> thread = api.save_rule_chain_using_post1(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str rule_chain_id: ruleChainId (required) + :param RuleChain body: ruleChain (required) :return: RuleChain If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.assign_rule_chain_to_edge_using_post_with_http_info(edge_id, rule_chain_id, - **kwargs) # noqa: E501 + return self.save_rule_chain_using_post1_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.assign_rule_chain_to_edge_using_post_with_http_info(edge_id, rule_chain_id, - **kwargs) # noqa: E501 + (data) = self.save_rule_chain_using_post1_with_http_info(body, **kwargs) # noqa: E501 return data - def assign_rule_chain_to_edge_using_post_with_http_info(self, edge_id, rule_chain_id, **kwargs): - """assignRuleChainToEdge # noqa: E501 + def save_rule_chain_using_post1_with_http_info(self, body, **kwargs): # noqa: E501 + """saveRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.assign_rule_chain_to_edge_using_post_with_http_info(edge_id, rule_chain_id, async_req=True) + >>> thread = api.save_rule_chain_using_post1_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str rule_chain_id: ruleChainId (required) + :param RuleChain body: ruleChain (required) :return: RuleChain If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'rule_chain_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') @@ -1051,28 +1252,22 @@ def assign_rule_chain_to_edge_using_post_with_http_info(self, edge_id, rule_chai 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_rule_chain_using_post1" % 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_rule_chain_from_edge_using_delete`") # noqa: E501 - # 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 `unassign_rule_chain_from_edge_using_delete`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_rule_chain_using_post1`") # noqa: E501 collection_formats = {} path_params = {} - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 - if 'rule_chain_id' in params: - path_params['ruleChainId'] = params['rule_chain_id'] # noqa: E501 - query_params = [] header_params = {} @@ -1081,7 +1276,8 @@ def assign_rule_chain_to_edge_using_post_with_http_info(self, edge_id, rule_chai 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( ['*/*']) # noqa: E501 @@ -1094,7 +1290,7 @@ def assign_rule_chain_to_edge_using_post_with_http_info(self, edge_id, rule_chai auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/edge/{edgeId}/ruleChain/{ruleChainId}', 'POST', + '/api/ruleChain', 'POST', path_params, query_params, header_params, @@ -1109,55 +1305,43 @@ def assign_rule_chain_to_edge_using_post_with_http_info(self, edge_id, rule_chai _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_edge_rule_chains_using_get(self, edge_id, page_size, page, **kwargs): - """getEdgeRuleChains # noqa: E501 + def set_auto_assign_to_edge_rule_chain_using_post(self, rule_chain_id, **kwargs): # noqa: E501 + """setAutoAssignToEdgeRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_edge_rule_chains_using_get(edge_id, page_size, page, async_req=True) + >>> thread = api.set_auto_assign_to_edge_rule_chain_using_post(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: list[RuleChain] + :param str rule_chain_id: ruleChainId (required) + :return: RuleChain 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_rule_chains_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 + return self.set_auto_assign_to_edge_rule_chain_using_post_with_http_info(rule_chain_id, **kwargs) # noqa: E501 else: - (data) = self.get_edge_rule_chains_using_get_with_http_info(edge_id, page_size, page, - **kwargs) # noqa: E501 + (data) = self.set_auto_assign_to_edge_rule_chain_using_post_with_http_info(rule_chain_id, **kwargs) # noqa: E501 return data - def get_edge_rule_chains_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): - """getEdgeRuleChains # noqa: E501 + def set_auto_assign_to_edge_rule_chain_using_post_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 + """setAutoAssignToEdgeRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_edge_rule_chains_using_get_with_http_info(edge_id, page_size, page, async_req=True) + >>> thread = api.set_auto_assign_to_edge_rule_chain_using_post_with_http_info(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str edge_id: edgeId (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: list[RuleChain] + :param str rule_chain_id: ruleChainId (required) + :return: RuleChain If the method is called asynchronously, returns the request thread. """ - all_params = ['edge_id', 'text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501 + all_params = ['rule_chain_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1165,71 +1349,48 @@ def get_edge_rule_chains_using_get_with_http_info(self, edge_id, page_size, page 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_auto_assign_to_edge_rule_chain_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 `get_edge_rule_chains_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_rule_chains_using_get`") # noqa: - # 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_rule_chains_using_get`") # noqa: E501 + # 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 `set_auto_assign_to_edge_rule_chain_using_post`") # noqa: E501 collection_formats = {} path_params = {} - - if 'edge_id' in params: - path_params['edgeId'] = params['edge_id'] # noqa: E501 + if 'rule_chain_id' in params: + path_params['ruleChainId'] = params['rule_chain_id'] # noqa: E501 query_params = [] - 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 '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 - # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/{edgeId}/ruleChains{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/ruleChain/{ruleChainId}/autoAssignToEdge', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[RuleChain]', # noqa: E501 + response_type='RuleChain', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1237,42 +1398,43 @@ def get_edge_rule_chains_using_get_with_http_info(self, edge_id, page_size, page _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_auto_assign_to_edge_rule_chains_using_get(self, **kwargs): - """getAutoAssignToEdgeRuleChains # noqa: E501 + def set_edge_template_root_rule_chain_using_post(self, rule_chain_id, **kwargs): # noqa: E501 + """setEdgeTemplateRootRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_auto_assign_to_edge_rule_chains_using_get(async_req=True) + >>> thread = api.set_edge_template_root_rule_chain_using_post(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :return: list[RuleChain] + :param str rule_chain_id: ruleChainId (required) + :return: RuleChain 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_assign_to_edge_rule_chains_using_get_with_http_info(**kwargs) # noqa: E501 + return self.set_edge_template_root_rule_chain_using_post_with_http_info(rule_chain_id, **kwargs) # noqa: E501 else: - (data) = self.get_auto_assign_to_edge_rule_chains_using_get_with_http_info(**kwargs) # noqa: E501 + (data) = self.set_edge_template_root_rule_chain_using_post_with_http_info(rule_chain_id, **kwargs) # noqa: E501 return data - def get_auto_assign_to_edge_rule_chains_using_get_with_http_info(self, **kwargs): - """getAutoAssignToEdgeRuleChains # noqa: E501 + def set_edge_template_root_rule_chain_using_post_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 + """setEdgeTemplateRootRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_auto_assign_to_edge_rule_chains_using_get_with_http_info(async_req=True) + >>> thread = api.set_edge_template_root_rule_chain_using_post_with_http_info(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :return: list[RuleChain] + :param str rule_chain_id: ruleChainId (required) + :return: RuleChain If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['rule_chain_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1280,12 +1442,23 @@ def get_auto_assign_to_edge_rule_chains_using_get_with_http_info(self, **kwargs) 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_edge_template_root_rule_chain_using_post" % 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 `set_edge_template_root_rule_chain_using_post`") # noqa: E501 collection_formats = {} path_params = {} + if 'rule_chain_id' in params: + path_params['ruleChainId'] = params['rule_chain_id'] # noqa: E501 query_params = [] @@ -1295,27 +1468,22 @@ def get_auto_assign_to_edge_rule_chains_using_get_with_http_info(self, **kwargs) local_var_files = {} body_params = None - # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/ruleChain/autoAssignToEdgeRuleChains', 'GET', + '/api/ruleChain/{ruleChainId}/edgeTemplateRoot', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[RuleChain]', # noqa: E501 + response_type='RuleChain', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1323,41 +1491,38 @@ def get_auto_assign_to_edge_rule_chains_using_get_with_http_info(self, **kwargs) _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def unset_auto_assign_to_edge_rule_chain_using_delete(self, rule_chain_id, **kwargs): - """unsetAutoAssignToEdgeRuleChain # noqa: E501 + def set_root_rule_chain_using_post1(self, rule_chain_id, **kwargs): # noqa: E501 + """setRootRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unset_auto_assign_to_edge_rule_chain_using_delete(rule_chain_id, async_req=True) + >>> thread = api.set_root_rule_chain_using_post1(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :param rule_chain_id: ruleChainId - :return: None + :param str rule_chain_id: ruleChainId (required) + :return: RuleChain If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.unset_auto_assign_to_edge_rule_chain_using_delete_with_http_info(rule_chain_id, - **kwargs) # noqa: E501 + return self.set_root_rule_chain_using_post1_with_http_info(rule_chain_id, **kwargs) # noqa: E501 else: - (data) = self.unset_auto_assign_to_edge_rule_chain_using_delete_with_http_info(rule_chain_id, - **kwargs) # noqa: E501 + (data) = self.set_root_rule_chain_using_post1_with_http_info(rule_chain_id, **kwargs) # noqa: E501 return data - def unset_auto_assign_to_edge_rule_chain_using_delete_with_http_info(self, rule_chain_id, **kwargs): - """unsetAutoAssignToEdgeRuleChain # noqa: E501 + def set_root_rule_chain_using_post1_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 + """setRootRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.unset_auto_assign_to_edge_rule_chain_using_delete_with_http_info(rule_chain_id, async_req=True) + >>> thread = api.set_root_rule_chain_using_post1_with_http_info(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :param rule_chain_id: ruleChainId - :return: None + :param str rule_chain_id: ruleChainId (required) + :return: RuleChain If the method is called asynchronously, returns the request thread. """ @@ -1370,19 +1535,21 @@ def unset_auto_assign_to_edge_rule_chain_using_delete_with_http_info(self, rule_ 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_root_rule_chain_using_post1" % 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 `unset_auto_assign_to_edge_rule_chain_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `rule_chain_id` when calling `set_root_rule_chain_using_post1`") # noqa: E501 collection_formats = {} path_params = {} - if 'rule_chain_id' in params: path_params['ruleChainId'] = params['rule_chain_id'] # noqa: E501 @@ -1394,27 +1561,22 @@ def unset_auto_assign_to_edge_rule_chain_using_delete_with_http_info(self, rule_ local_var_files = {} body_params = None - # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/ruleChain/{ruleChainId}/autoAssignToEdge', 'DELETE', + '/api/ruleChain/{ruleChainId}/root', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='RuleChain', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1422,46 +1584,43 @@ def unset_auto_assign_to_edge_rule_chain_using_delete_with_http_info(self, rule_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def set_auto_assign_to_edge_rule_chain_using_post(self, rule_chain_id, **kwargs): - """setAutoAssignToEdgeRuleChain # noqa: E501 + def test_script_using_post(self, body, **kwargs): # noqa: E501 + """testScript # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.set_auto_assign_to_edge_rule_chain_using_post(rule_chain_id, async_req=True) + >>> thread = api.test_script_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param rule_chain_id: ruleChainId - :return: None + :param str body: inputParams (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.set_auto_assign_to_edge_rule_chain_using_post_with_http_info(rule_chain_id, - **kwargs) # noqa: E501 + return self.test_script_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.set_auto_assign_to_edge_rule_chain_using_post_with_http_info(rule_chain_id, - **kwargs) # noqa: E501 + (data) = self.test_script_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def set_auto_assign_to_edge_rule_chain_using_post_with_http_info(self, rule_chain_id, **kwargs): - """setAutoAssignToEdgeRuleChain # noqa: E501 + def test_script_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """testScript # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.set_auto_assign_to_edge_rule_chain_using_post(rule_chain_id, async_req=True) + >>> thread = api.test_script_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param rule_chain_id: ruleChainId - :return: None + :param str body: inputParams (required) + :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['rule_chain_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') @@ -1469,22 +1628,22 @@ def set_auto_assign_to_edge_rule_chain_using_post_with_http_info(self, rule_chai 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 test_script_using_post" % 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 `set_auto_assign_to_edge_rule_chain_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `test_script_using_post`") # 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 = {} @@ -1493,7 +1652,8 @@ def set_auto_assign_to_edge_rule_chain_using_post_with_http_info(self, rule_chai 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( ['*/*']) # noqa: E501 @@ -1506,14 +1666,14 @@ def set_auto_assign_to_edge_rule_chain_using_post_with_http_info(self, rule_chai auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/ruleChain/{ruleChainId}/autoAssignToEdge', 'POST', + '/api/ruleChain/testScript', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # 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'), @@ -1521,46 +1681,45 @@ def set_auto_assign_to_edge_rule_chain_using_post_with_http_info(self, rule_chai _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def set_edge_template_root_rule_chain_using_post(self, rule_chain_id, **kwargs): - """setEdgeTemplateRootRuleChain # noqa: E501 + def unassign_rule_chain_from_edge_using_delete(self, edge_id, rule_chain_id, **kwargs): # noqa: E501 + """unassignRuleChainFromEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.set_edge_template_root_rule_chain_using_post(rule_chain_id, async_req=True) + >>> thread = api.unassign_rule_chain_from_edge_using_delete(edge_id, rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :param rule_chain_id: ruleChainId + :param str edge_id: edgeId (required) + :param str rule_chain_id: ruleChainId (required) :return: RuleChain If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.set_edge_template_root_rule_chain_using_post_with_http_info(rule_chain_id, - **kwargs) # noqa: E501 + return self.unassign_rule_chain_from_edge_using_delete_with_http_info(edge_id, rule_chain_id, **kwargs) # noqa: E501 else: - (data) = self.set_edge_template_root_rule_chain_using_post_with_http_info(rule_chain_id, - **kwargs) # noqa: E501 + (data) = self.unassign_rule_chain_from_edge_using_delete_with_http_info(edge_id, rule_chain_id, **kwargs) # noqa: E501 return data - def set_edge_template_root_rule_chain_using_post_with_http_info(self, rule_chain_id, **kwargs): - """setEdgeTemplateRootRuleChain # noqa: E501 + def unassign_rule_chain_from_edge_using_delete_with_http_info(self, edge_id, rule_chain_id, **kwargs): # noqa: E501 + """unassignRuleChainFromEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.set_edge_template_root_rule_chain_using_post_with_http_info(rule_chain_id, async_req=True) + >>> thread = api.unassign_rule_chain_from_edge_using_delete_with_http_info(edge_id, rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :param rule_chain_id: ruleChainId + :param str edge_id: edgeId (required) + :param str rule_chain_id: ruleChainId (required) :return: RuleChain If the method is called asynchronously, returns the request thread. """ - all_params = ['rule_chain_id'] # noqa: E501 + all_params = ['edge_id', 'rule_chain_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1568,19 +1727,27 @@ def set_edge_template_root_rule_chain_using_post_with_http_info(self, rule_chain 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_rule_chain_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_rule_chain_from_edge_using_delete`") # noqa: E501 # 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 `set_auto_assign_to_edge_rule_chain_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `rule_chain_id` when calling `unassign_rule_chain_from_edge_using_delete`") # noqa: E501 collection_formats = {} path_params = {} - + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 if 'rule_chain_id' in params: path_params['ruleChainId'] = params['rule_chain_id'] # noqa: E501 @@ -1592,20 +1759,15 @@ def set_edge_template_root_rule_chain_using_post_with_http_info(self, rule_chain local_var_files = {} body_params = None - # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/ruleChain/{ruleChainId}/edgeTemplateRoot', 'POST', + '/api/edge/{edgeId}/ruleChain/{ruleChainId}', 'DELETE', path_params, query_params, header_params, @@ -1620,44 +1782,43 @@ def set_edge_template_root_rule_chain_using_post_with_http_info(self, rule_chain _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def export_rule_chains_using_get(self, limit, **kwargs): - """exportRuleChains # noqa: E501 + def unset_auto_assign_to_edge_rule_chain_using_delete(self, rule_chain_id, **kwargs): # noqa: E501 + """unsetAutoAssignToEdgeRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.export_rule_chains_using_get(limit, async_req=True) + >>> thread = api.unset_auto_assign_to_edge_rule_chain_using_delete(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :param limit: limit - :return: list[RuleChain] + :param str rule_chain_id: ruleChainId (required) + :return: RuleChain If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.export_rule_chains_using_get_with_http_info(limit, **kwargs) # noqa: E501 + return self.unset_auto_assign_to_edge_rule_chain_using_delete_with_http_info(rule_chain_id, **kwargs) # noqa: E501 else: - (data) = self.export_rule_chains_using_get_with_http_info(limit, **kwargs) # noqa: E501 + (data) = self.unset_auto_assign_to_edge_rule_chain_using_delete_with_http_info(rule_chain_id, **kwargs) # noqa: E501 return data - def export_rule_chains_using_get_with_http_info(self, limit, **kwargs): - """exportRuleChains # noqa: E501 + def unset_auto_assign_to_edge_rule_chain_using_delete_with_http_info(self, rule_chain_id, **kwargs): # noqa: E501 + """unsetAutoAssignToEdgeRuleChain # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.export_rule_chains_using_get_with_http_info(limit, async_req=True) + >>> thread = api.unset_auto_assign_to_edge_rule_chain_using_delete_with_http_info(rule_chain_id, async_req=True) >>> result = thread.get() :param async_req bool - :param limit: limit - :return: list[RuleChain] + :param str rule_chain_id: ruleChainId (required) + :return: RuleChain If the method is called asynchronously, returns the request thread. """ - all_params = ['limit'] # noqa: E501 + all_params = ['rule_chain_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1665,51 +1826,48 @@ def export_rule_chains_using_get_with_http_info(self, limit, **kwargs): 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 unset_auto_assign_to_edge_rule_chain_using_delete" % key + ) params[key] = val del params['kwargs'] - - # verify the required parameter 'limit' is set - if ('limit' not in params or - params['limit'] is None): - raise ValueError( - "Missing the required parameter `limit` when calling `export_rule_chains_using_get`") # noqa: E501 + # 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 `unset_auto_assign_to_edge_rule_chain_using_delete`") # noqa: E501 collection_formats = {} path_params = {} + if 'rule_chain_id' in params: + path_params['ruleChainId'] = params['rule_chain_id'] # noqa: E501 query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 - header_params = {} form_params = [] local_var_files = {} body_params = None - # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/ruleChains/export{?limit}', 'GET', + '/api/ruleChain/{ruleChainId}/autoAssignToEdge', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[RuleChain]', # noqa: E501 + response_type='RuleChain', # 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/sign_up_controller_api.py b/tb_rest_client/api/api_ce/sign_up_controller_api.py new file mode 100644 index 00000000..1247ee1c --- /dev/null +++ b/tb_rest_client/api/api_ce/sign_up_controller_api.py @@ -0,0 +1,741 @@ +# 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 +""" + +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: str + 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: 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 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( + ['*/*']) # 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='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_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) + :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) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['email_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 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 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/noauth/activateEmail{?emailCode}', '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) + :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_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) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['email_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 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 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/noauth/activateByEmailCode{?emailCode}', '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 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 + # 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( + ['*/*']) # 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 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( + ['*/*']) # 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) + :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) + :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_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 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/noauth/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 sign_up_using_post(self, body, **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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SignUpRequest body: signUpRequest (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.sign_up_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.sign_up_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def sign_up_using_post_with_http_info(self, body, **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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SignUpRequest body: signUpRequest (required) + :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'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `sign_up_using_post`") # noqa: E501 + + 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( + ['*/*']) # 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 2f5cebc8..02ea341b 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 @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -85,8 +84,8 @@ def delete_resource_using_delete1_with_http_info(self, resource_id, **kwargs): params[key] = val del params['kwargs'] # verify the required parameter 'resource_id' is set - if self.api_client.client_side_validation and ('resource_id' not in params or - params['resource_id'] is None): # noqa: E501 + 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 collection_formats = {} @@ -103,14 +102,6 @@ def delete_resource_using_delete1_with_http_info(self, resource_id, **kwargs): local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -182,8 +173,8 @@ def download_resource_using_get_with_http_info(self, resource_id, **kwargs): # params[key] = val del params['kwargs'] # verify the required parameter 'resource_id' is set - if self.api_client.client_side_validation and ('resource_id' not in params or - params['resource_id'] is None): # noqa: E501 + if ('resource_id' not in params or + params['resource_id'] is None): raise ValueError("Missing the required parameter `resource_id` when calling `download_resource_using_get`") # noqa: E501 collection_formats = {} @@ -204,10 +195,6 @@ def download_resource_using_get_with_http_info(self, resource_id, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -287,12 +274,12 @@ def get_lwm2m_list_objects_page_using_get_with_http_info(self, page_size, page, params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_lwm2m_list_objects_page_using_get`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_lwm2m_list_objects_page_using_get`") # noqa: E501 collection_formats = {} @@ -321,10 +308,6 @@ def get_lwm2m_list_objects_page_using_get_with_http_info(self, page_size, page, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -400,12 +383,12 @@ def get_lwm2m_list_objects_using_get_with_http_info(self, sort_order, sort_prope params[key] = val del params['kwargs'] # verify the required parameter 'sort_order' is set - if self.api_client.client_side_validation and ('sort_order' not in params or - params['sort_order'] is None): # noqa: E501 + if ('sort_order' not in params or + params['sort_order'] is None): raise ValueError("Missing the required parameter `sort_order` when calling `get_lwm2m_list_objects_using_get`") # noqa: E501 # verify the required parameter 'sort_property' is set - if self.api_client.client_side_validation and ('sort_property' not in params or - params['sort_property'] is None): # noqa: E501 + if ('sort_property' not in params or + params['sort_property'] is None): raise ValueError("Missing the required parameter `sort_property` when calling `get_lwm2m_list_objects_using_get`") # noqa: E501 collection_formats = {} @@ -431,10 +414,6 @@ def get_lwm2m_list_objects_using_get_with_http_info(self, sort_order, sort_prope header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -506,8 +485,8 @@ def get_resource_by_id_using_get_with_http_info(self, resource_id, **kwargs): # params[key] = val del params['kwargs'] # verify the required parameter 'resource_id' is set - if self.api_client.client_side_validation and ('resource_id' not in params or - params['resource_id'] is None): # noqa: E501 + if ('resource_id' not in params or + params['resource_id'] is None): raise ValueError("Missing the required parameter `resource_id` when calling `get_resource_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -528,10 +507,6 @@ def get_resource_by_id_using_get_with_http_info(self, resource_id, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -603,8 +578,8 @@ def get_resource_info_by_id_using_get_with_http_info(self, resource_id, **kwargs params[key] = val del params['kwargs'] # verify the required parameter 'resource_id' is set - if self.api_client.client_side_validation and ('resource_id' not in params or - params['resource_id'] is None): # noqa: E501 + if ('resource_id' not in params or + params['resource_id'] is None): raise ValueError("Missing the required parameter `resource_id` when calling `get_resource_info_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -625,10 +600,6 @@ def get_resource_info_by_id_using_get_with_http_info(self, resource_id, **kwargs header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -708,12 +679,12 @@ def get_resources_using_get_with_http_info(self, page_size, page, **kwargs): # params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_resources_using_get`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_resources_using_get`") # noqa: E501 collection_formats = {} @@ -742,10 +713,6 @@ def get_resources_using_get_with_http_info(self, page_size, page, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -765,43 +732,43 @@ def get_resources_using_get_with_http_info(self, page_size, page, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_resource_using_post(self, resource, **kwargs): # noqa: E501 + def save_resource_using_post(self, body, **kwargs): # noqa: E501 """saveResource # 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(resource, async_req=True) + >>> thread = api.save_resource_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param TbResource resource: resource (required) + :param TbResource body: resource (required) :return: TbResource If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_resource_using_post_with_http_info(resource, **kwargs) # noqa: E501 + return self.save_resource_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_resource_using_post_with_http_info(resource, **kwargs) # noqa: E501 + (data) = self.save_resource_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_resource_using_post_with_http_info(self, resource, **kwargs): # noqa: E501 + def save_resource_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveResource # 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(resource, async_req=True) + >>> thread = api.save_resource_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param TbResource resource: resource (required) + :param TbResource body: resource (required) :return: TbResource If the method is called asynchronously, returns the request thread. """ - all_params = ['resource'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -816,10 +783,10 @@ def save_resource_using_post_with_http_info(self, resource, **kwargs): # noqa: ) params[key] = val del params['kwargs'] - # verify the required parameter 'resource' is set - if self.api_client.client_side_validation and ('resource' not in params or - params['resource'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `resource` when calling `save_resource_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_resource_using_post`") # noqa: E501 collection_formats = {} @@ -833,8 +800,8 @@ def save_resource_using_post_with_http_info(self, resource, **kwargs): # noqa: local_var_files = {} body_params = None - if 'resource' in params: - body_params = params['resource'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -860,4 +827,4 @@ def save_resource_using_post_with_http_info(self, resource, **kwargs): # noqa: _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_ce/telemetry_controller_api.py b/tb_rest_client/api/api_ce/telemetry_controller_api.py index 51759ee0..1836f8df 100644 --- a/tb_rest_client/api/api_ce/telemetry_controller_api.py +++ b/tb_rest_client/api/api_ce/telemetry_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class TelemetryControllerApi(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 """ @@ -39,7 +37,7 @@ def delete_entity_attributes_using_delete(self, device_id, scope, keys, **kwargs This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_entity_attributes_using_delete(device_id, scope, keys, async_req=True) + >>> thread = api.delete_entity_attributes_using_delete(device_id, scope, keys, async_req=True) >>> result = thread.get() :param async_req bool @@ -62,7 +60,7 @@ def delete_entity_attributes_using_delete_with_http_info(self, device_id, scope, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_entity_attributes_using_delete_with_http_info(device_id, scope, keys, async_req=True) + >>> thread = api.delete_entity_attributes_using_delete_with_http_info(device_id, scope, keys, async_req=True) >>> result = thread.get() :param async_req bool @@ -82,7 +80,11 @@ def delete_entity_attributes_using_delete_with_http_info(self, device_id, scope, 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_entity_attributes_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'device_id' is set @@ -120,10 +122,6 @@ def delete_entity_attributes_using_delete_with_http_info(self, device_id, scope, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -148,7 +146,7 @@ def delete_entity_attributes_using_delete1(self, entity_type, entity_id, scope, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_entity_attributes_using_delete1(entity_type, entity_id, scope, keys, async_req=True) + >>> thread = api.delete_entity_attributes_using_delete1(entity_type, entity_id, scope, keys, async_req=True) >>> result = thread.get() :param async_req bool @@ -172,7 +170,7 @@ def delete_entity_attributes_using_delete1_with_http_info(self, entity_type, ent This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_entity_attributes_using_delete1_with_http_info(entity_type, entity_id, scope, keys, async_req=True) + >>> thread = api.delete_entity_attributes_using_delete1_with_http_info(entity_type, entity_id, scope, keys, async_req=True) >>> result = thread.get() :param async_req bool @@ -193,7 +191,11 @@ def delete_entity_attributes_using_delete1_with_http_info(self, entity_type, ent 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_entity_attributes_using_delete1" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_type' is set @@ -237,10 +239,6 @@ def delete_entity_attributes_using_delete1_with_http_info(self, entity_type, ent header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -265,7 +263,7 @@ def delete_entity_timeseries_using_delete(self, entity_type, entity_id, keys, ** This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_entity_timeseries_using_delete(entity_type, entity_id, keys, async_req=True) + >>> thread = api.delete_entity_timeseries_using_delete(entity_type, entity_id, keys, async_req=True) >>> result = thread.get() :param async_req bool @@ -292,7 +290,7 @@ def delete_entity_timeseries_using_delete_with_http_info(self, entity_type, enti This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_entity_timeseries_using_delete_with_http_info(entity_type, entity_id, keys, async_req=True) + >>> thread = api.delete_entity_timeseries_using_delete_with_http_info(entity_type, entity_id, keys, async_req=True) >>> result = thread.get() :param async_req bool @@ -316,7 +314,11 @@ def delete_entity_timeseries_using_delete_with_http_info(self, entity_type, enti 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_entity_timeseries_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_type' is set @@ -362,10 +364,6 @@ def delete_entity_timeseries_using_delete_with_http_info(self, entity_type, enti header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -390,7 +388,7 @@ def get_attribute_keys_by_scope_using_get(self, entity_type, entity_id, scope, * This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_attribute_keys_by_scope_using_get(entity_type, entity_id, scope, async_req=True) + >>> thread = api.get_attribute_keys_by_scope_using_get(entity_type, entity_id, scope, async_req=True) >>> result = thread.get() :param async_req bool @@ -413,7 +411,7 @@ def get_attribute_keys_by_scope_using_get_with_http_info(self, entity_type, enti This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_attribute_keys_by_scope_using_get_with_http_info(entity_type, entity_id, scope, async_req=True) + >>> thread = api.get_attribute_keys_by_scope_using_get_with_http_info(entity_type, entity_id, scope, async_req=True) >>> result = thread.get() :param async_req bool @@ -433,7 +431,11 @@ def get_attribute_keys_by_scope_using_get_with_http_info(self, entity_type, enti 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_attribute_keys_by_scope_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_type' is set @@ -471,10 +473,6 @@ def get_attribute_keys_by_scope_using_get_with_http_info(self, entity_type, enti header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -499,7 +497,7 @@ def get_attribute_keys_using_get(self, entity_type, entity_id, **kwargs): # noq This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_attribute_keys_using_get(entity_type, entity_id, async_req=True) + >>> thread = api.get_attribute_keys_using_get(entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -521,7 +519,7 @@ def get_attribute_keys_using_get_with_http_info(self, entity_type, entity_id, ** This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_attribute_keys_using_get_with_http_info(entity_type, entity_id, async_req=True) + >>> thread = api.get_attribute_keys_using_get_with_http_info(entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -540,7 +538,11 @@ def get_attribute_keys_using_get_with_http_info(self, entity_type, entity_id, ** 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_attribute_keys_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_type' is set @@ -572,10 +574,6 @@ def get_attribute_keys_using_get_with_http_info(self, entity_type, entity_id, ** header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -600,7 +598,7 @@ def get_attributes_by_scope_using_get(self, entity_type, entity_id, scope, **kwa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_attributes_by_scope_using_get(entity_type, entity_id, scope, async_req=True) + >>> thread = api.get_attributes_by_scope_using_get(entity_type, entity_id, scope, async_req=True) >>> result = thread.get() :param async_req bool @@ -624,7 +622,7 @@ def get_attributes_by_scope_using_get_with_http_info(self, entity_type, entity_i This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_attributes_by_scope_using_get_with_http_info(entity_type, entity_id, scope, async_req=True) + >>> thread = api.get_attributes_by_scope_using_get_with_http_info(entity_type, entity_id, scope, async_req=True) >>> result = thread.get() :param async_req bool @@ -645,7 +643,11 @@ def get_attributes_by_scope_using_get_with_http_info(self, entity_type, entity_i 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_attributes_by_scope_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_type' is set @@ -685,10 +687,6 @@ def get_attributes_by_scope_using_get_with_http_info(self, entity_type, entity_i header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -713,7 +711,7 @@ def get_attributes_using_get(self, entity_type, entity_id, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_attributes_using_get(entity_type, entity_id, async_req=True) + >>> thread = api.get_attributes_using_get(entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -736,7 +734,7 @@ def get_attributes_using_get_with_http_info(self, entity_type, entity_id, **kwar This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_attributes_using_get_with_http_info(entity_type, entity_id, async_req=True) + >>> thread = api.get_attributes_using_get_with_http_info(entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -756,7 +754,11 @@ def get_attributes_using_get_with_http_info(self, entity_type, entity_id, **kwar 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_attributes_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_type' is set @@ -790,10 +792,6 @@ def get_attributes_using_get_with_http_info(self, entity_type, entity_id, **kwar header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -818,7 +816,7 @@ def get_latest_timeseries_using_get(self, entity_type, entity_id, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_latest_timeseries_using_get(entity_type, entity_id, async_req=True) + >>> thread = api.get_latest_timeseries_using_get(entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -842,7 +840,7 @@ def get_latest_timeseries_using_get_with_http_info(self, entity_type, entity_id, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_latest_timeseries_using_get_with_http_info(entity_type, entity_id, async_req=True) + >>> thread = api.get_latest_timeseries_using_get_with_http_info(entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -863,7 +861,11 @@ def get_latest_timeseries_using_get_with_http_info(self, entity_type, entity_id, 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_latest_timeseries_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_type' is set @@ -899,10 +901,6 @@ def get_latest_timeseries_using_get_with_http_info(self, entity_type, entity_id, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -922,12 +920,12 @@ def get_latest_timeseries_using_get_with_http_info(self, entity_type, entity_id, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_timeseries_keys_using_get(self, entity_type, entity_id, **kwargs): # noqa: E501 + def get_timeseries_keys_using_get1(self, entity_type, entity_id, **kwargs): # noqa: E501 """getTimeseriesKeys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_timeseries_keys_using_get(entity_type, entity_id, async_req=True) + >>> thread = api.get_timeseries_keys_using_get1(entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -939,17 +937,17 @@ def get_timeseries_keys_using_get(self, entity_type, entity_id, **kwargs): # no """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_timeseries_keys_using_get_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 + return self.get_timeseries_keys_using_get1_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 else: - (data) = self.get_timeseries_keys_using_get_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 + (data) = self.get_timeseries_keys_using_get1_with_http_info(entity_type, entity_id, **kwargs) # noqa: E501 return data - def get_timeseries_keys_using_get_with_http_info(self, entity_type, entity_id, **kwargs): # noqa: E501 + def get_timeseries_keys_using_get1_with_http_info(self, entity_type, entity_id, **kwargs): # noqa: E501 """getTimeseriesKeys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_timeseries_keys_using_get_with_http_info(entity_type, entity_id, async_req=True) + >>> thread = api.get_timeseries_keys_using_get1_with_http_info(entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -968,17 +966,21 @@ def get_timeseries_keys_using_get_with_http_info(self, entity_type, entity_id, * 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_timeseries_keys_using_get1" % 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_timeseries_keys_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_type` when calling `get_timeseries_keys_using_get1`") # 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_timeseries_keys_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_id` when calling `get_timeseries_keys_using_get1`") # noqa: E501 collection_formats = {} @@ -1000,10 +1002,6 @@ def get_timeseries_keys_using_get_with_http_info(self, entity_type, entity_id, * header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1028,7 +1026,7 @@ def get_timeseries_using_get(self, entity_type, entity_id, keys, start_ts, end_t This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_timeseries_using_get(entity_type, entity_id, keys, start_ts, end_ts, async_req=True) + >>> thread = api.get_timeseries_using_get(entity_type, entity_id, keys, start_ts, end_ts, async_req=True) >>> result = thread.get() :param async_req bool @@ -1040,6 +1038,7 @@ def get_timeseries_using_get(self, entity_type, entity_id, keys, start_ts, end_t :param int interval: interval :param int limit: limit :param str agg: agg + :param str order_by: orderBy :param bool use_strict_data_types: useStrictDataTypes :return: DeferredResultResponseEntity If the method is called asynchronously, @@ -1057,7 +1056,7 @@ def get_timeseries_using_get_with_http_info(self, entity_type, entity_id, keys, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_timeseries_using_get_with_http_info(entity_type, entity_id, keys, start_ts, end_ts, async_req=True) + >>> thread = api.get_timeseries_using_get_with_http_info(entity_type, entity_id, keys, start_ts, end_ts, async_req=True) >>> result = thread.get() :param async_req bool @@ -1069,13 +1068,14 @@ def get_timeseries_using_get_with_http_info(self, entity_type, entity_id, keys, :param int interval: interval :param int limit: limit :param str agg: agg + :param str order_by: orderBy :param bool use_strict_data_types: useStrictDataTypes :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'keys', 'start_ts', 'end_ts', 'interval', 'limit', 'agg', 'use_strict_data_types'] # noqa: E501 + all_params = ['entity_type', 'entity_id', 'keys', 'start_ts', 'end_ts', 'interval', 'limit', 'agg', 'order_by', 'use_strict_data_types'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1083,7 +1083,11 @@ def get_timeseries_using_get_with_http_info(self, entity_type, entity_id, keys, 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_timeseries_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_type' is set @@ -1122,6 +1126,8 @@ def get_timeseries_using_get_with_http_info(self, entity_type, entity_id, keys, query_params.append(('limit', params['limit'])) # noqa: E501 if 'agg' in params: query_params.append(('agg', params['agg'])) # noqa: E501 + if 'order_by' in params: + query_params.append(('orderBy', params['order_by'])) # noqa: E501 if 'use_strict_data_types' in params: query_params.append(('useStrictDataTypes', params['use_strict_data_types'])) # noqa: E501 if 'keys' in params: @@ -1141,15 +1147,11 @@ def get_timeseries_using_get_with_http_info(self, entity_type, entity_id, keys, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/plugins/telemetry/{entityType}/{entityId}/values/timeseries{?interval,limit,agg,useStrictDataTypes,keys,startTs,endTs}', 'GET', + '/api/plugins/telemetry/{entityType}/{entityId}/values/timeseries{?interval,limit,agg,orderBy,useStrictDataTypes,keys,startTs,endTs}', 'GET', path_params, query_params, header_params, @@ -1164,47 +1166,47 @@ def get_timeseries_using_get_with_http_info(self, entity_type, entity_id, keys, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_device_attributes_using_post(self, device_id, scope, request, **kwargs): # noqa: E501 + def save_device_attributes_using_post(self, body, device_id, scope, **kwargs): # noqa: E501 """saveDeviceAttributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_device_attributes_using_post(device_id, scope, request, async_req=True) + >>> thread = api.save_device_attributes_using_post(body, device_id, scope, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: request (required) :param str device_id: deviceId (required) :param str scope: scope (required) - :param str request: request (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.save_device_attributes_using_post_with_http_info(device_id, scope, request, **kwargs) # noqa: E501 + return self.save_device_attributes_using_post_with_http_info(body, device_id, scope, **kwargs) # noqa: E501 else: - (data) = self.save_device_attributes_using_post_with_http_info(device_id, scope, request, **kwargs) # noqa: E501 + (data) = self.save_device_attributes_using_post_with_http_info(body, device_id, scope, **kwargs) # noqa: E501 return data - def save_device_attributes_using_post_with_http_info(self, device_id, scope, request, **kwargs): # noqa: E501 + def save_device_attributes_using_post_with_http_info(self, body, device_id, scope, **kwargs): # noqa: E501 """saveDeviceAttributes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_device_attributes_using_post_with_http_info(device_id, scope, request, async_req=True) + >>> thread = api.save_device_attributes_using_post_with_http_info(body, device_id, scope, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: request (required) :param str device_id: deviceId (required) :param str scope: scope (required) - :param str request: request (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['device_id', 'scope', 'request'] # noqa: E501 + all_params = ['body', 'device_id', 'scope'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1212,9 +1214,17 @@ def save_device_attributes_using_post_with_http_info(self, device_id, scope, req 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_device_attributes_using_post" % key + ) params[key] = val del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_device_attributes_using_post`") # noqa: E501 # verify the required parameter 'device_id' is set if ('device_id' not in params or params['device_id'] is None): @@ -1223,10 +1233,6 @@ def save_device_attributes_using_post_with_http_info(self, device_id, scope, req if ('scope' not in params or params['scope'] is None): raise ValueError("Missing the required parameter `scope` when calling `save_device_attributes_using_post`") # noqa: E501 - # verify the required parameter 'request' is set - if ('request' not in params or - params['request'] is None): - raise ValueError("Missing the required parameter `request` when calling `save_device_attributes_using_post`") # noqa: E501 collection_formats = {} @@ -1244,8 +1250,8 @@ def save_device_attributes_using_post_with_http_info(self, device_id, scope, req local_var_files = {} body_params = None - if 'request' in params: - body_params = params['request'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -1273,49 +1279,49 @@ def save_device_attributes_using_post_with_http_info(self, device_id, scope, req _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_entity_attributes_v1_using_post(self, entity_type, entity_id, scope, request, **kwargs): # noqa: E501 + def save_entity_attributes_v1_using_post(self, body, entity_type, entity_id, scope, **kwargs): # noqa: E501 """saveEntityAttributesV1 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_attributes_v1_using_post(entity_type, entity_id, scope, request, async_req=True) + >>> thread = api.save_entity_attributes_v1_using_post(body, entity_type, entity_id, scope, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: request (required) :param str entity_type: entityType (required) :param str entity_id: entityId (required) :param str scope: scope (required) - :param str request: request (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.save_entity_attributes_v1_using_post_with_http_info(entity_type, entity_id, scope, request, **kwargs) # noqa: E501 + return self.save_entity_attributes_v1_using_post_with_http_info(body, entity_type, entity_id, scope, **kwargs) # noqa: E501 else: - (data) = self.save_entity_attributes_v1_using_post_with_http_info(entity_type, entity_id, scope, request, **kwargs) # noqa: E501 + (data) = self.save_entity_attributes_v1_using_post_with_http_info(body, entity_type, entity_id, scope, **kwargs) # noqa: E501 return data - def save_entity_attributes_v1_using_post_with_http_info(self, entity_type, entity_id, scope, request, **kwargs): # noqa: E501 + def save_entity_attributes_v1_using_post_with_http_info(self, body, entity_type, entity_id, scope, **kwargs): # noqa: E501 """saveEntityAttributesV1 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_attributes_v1_using_post_with_http_info(entity_type, entity_id, scope, request, async_req=True) + >>> thread = api.save_entity_attributes_v1_using_post_with_http_info(body, entity_type, entity_id, scope, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: request (required) :param str entity_type: entityType (required) :param str entity_id: entityId (required) :param str scope: scope (required) - :param str request: request (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'scope', 'request'] # noqa: E501 + all_params = ['body', 'entity_type', 'entity_id', 'scope'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1323,9 +1329,17 @@ def save_entity_attributes_v1_using_post_with_http_info(self, entity_type, entit 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_entity_attributes_v1_using_post" % key + ) params[key] = val del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_entity_attributes_v1_using_post`") # noqa: E501 # verify the required parameter 'entity_type' is set if ('entity_type' not in params or params['entity_type'] is None): @@ -1338,10 +1352,6 @@ def save_entity_attributes_v1_using_post_with_http_info(self, entity_type, entit if ('scope' not in params or params['scope'] is None): raise ValueError("Missing the required parameter `scope` when calling `save_entity_attributes_v1_using_post`") # noqa: E501 - # verify the required parameter 'request' is set - if ('request' not in params or - params['request'] is None): - raise ValueError("Missing the required parameter `request` when calling `save_entity_attributes_v1_using_post`") # noqa: E501 collection_formats = {} @@ -1361,8 +1371,8 @@ def save_entity_attributes_v1_using_post_with_http_info(self, entity_type, entit local_var_files = {} body_params = None - if 'request' in params: - body_params = params['request'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -1390,49 +1400,49 @@ def save_entity_attributes_v1_using_post_with_http_info(self, entity_type, entit _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_entity_attributes_v2_using_post(self, entity_type, entity_id, scope, request, **kwargs): # noqa: E501 + def save_entity_attributes_v2_using_post(self, body, entity_type, entity_id, scope, **kwargs): # noqa: E501 """saveEntityAttributesV2 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_attributes_v2_using_post(entity_type, entity_id, scope, request, async_req=True) + >>> thread = api.save_entity_attributes_v2_using_post(body, entity_type, entity_id, scope, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: request (required) :param str entity_type: entityType (required) :param str entity_id: entityId (required) :param str scope: scope (required) - :param str request: request (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.save_entity_attributes_v2_using_post_with_http_info(entity_type, entity_id, scope, request, **kwargs) # noqa: E501 + return self.save_entity_attributes_v2_using_post_with_http_info(body, entity_type, entity_id, scope, **kwargs) # noqa: E501 else: - (data) = self.save_entity_attributes_v2_using_post_with_http_info(entity_type, entity_id, scope, request, **kwargs) # noqa: E501 + (data) = self.save_entity_attributes_v2_using_post_with_http_info(body, entity_type, entity_id, scope, **kwargs) # noqa: E501 return data - def save_entity_attributes_v2_using_post_with_http_info(self, entity_type, entity_id, scope, request, **kwargs): # noqa: E501 + def save_entity_attributes_v2_using_post_with_http_info(self, body, entity_type, entity_id, scope, **kwargs): # noqa: E501 """saveEntityAttributesV2 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_attributes_v2_using_post_with_http_info(entity_type, entity_id, scope, request, async_req=True) + >>> thread = api.save_entity_attributes_v2_using_post_with_http_info(body, entity_type, entity_id, scope, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: request (required) :param str entity_type: entityType (required) :param str entity_id: entityId (required) :param str scope: scope (required) - :param str request: request (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'scope', 'request'] # noqa: E501 + all_params = ['body', 'entity_type', 'entity_id', 'scope'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1440,9 +1450,17 @@ def save_entity_attributes_v2_using_post_with_http_info(self, entity_type, entit 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_entity_attributes_v2_using_post" % key + ) params[key] = val del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_entity_attributes_v2_using_post`") # noqa: E501 # verify the required parameter 'entity_type' is set if ('entity_type' not in params or params['entity_type'] is None): @@ -1455,10 +1473,6 @@ def save_entity_attributes_v2_using_post_with_http_info(self, entity_type, entit if ('scope' not in params or params['scope'] is None): raise ValueError("Missing the required parameter `scope` when calling `save_entity_attributes_v2_using_post`") # noqa: E501 - # verify the required parameter 'request' is set - if ('request' not in params or - params['request'] is None): - raise ValueError("Missing the required parameter `request` when calling `save_entity_attributes_v2_using_post`") # noqa: E501 collection_formats = {} @@ -1478,8 +1492,8 @@ def save_entity_attributes_v2_using_post_with_http_info(self, entity_type, entit local_var_files = {} body_params = None - if 'request' in params: - body_params = params['request'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -1507,49 +1521,49 @@ def save_entity_attributes_v2_using_post_with_http_info(self, entity_type, entit _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_entity_telemetry_using_post(self, entity_type, entity_id, scope, request_body, **kwargs): # noqa: E501 + def save_entity_telemetry_using_post(self, body, entity_type, entity_id, scope, **kwargs): # noqa: E501 """saveEntityTelemetry # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_telemetry_using_post(entity_type, entity_id, scope, request_body, async_req=True) + >>> thread = api.save_entity_telemetry_using_post(body, entity_type, entity_id, scope, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: requestBody (required) :param str entity_type: entityType (required) :param str entity_id: entityId (required) :param str scope: scope (required) - :param str request_body: requestBody (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.save_entity_telemetry_using_post_with_http_info(entity_type, entity_id, scope, request_body, **kwargs) # noqa: E501 + return self.save_entity_telemetry_using_post_with_http_info(body, entity_type, entity_id, scope, **kwargs) # noqa: E501 else: - (data) = self.save_entity_telemetry_using_post_with_http_info(entity_type, entity_id, scope, request_body, **kwargs) # noqa: E501 + (data) = self.save_entity_telemetry_using_post_with_http_info(body, entity_type, entity_id, scope, **kwargs) # noqa: E501 return data - def save_entity_telemetry_using_post_with_http_info(self, entity_type, entity_id, scope, request_body, **kwargs): # noqa: E501 + def save_entity_telemetry_using_post_with_http_info(self, body, entity_type, entity_id, scope, **kwargs): # noqa: E501 """saveEntityTelemetry # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_telemetry_using_post_with_http_info(entity_type, entity_id, scope, request_body, async_req=True) + >>> thread = api.save_entity_telemetry_using_post_with_http_info(body, entity_type, entity_id, scope, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: requestBody (required) :param str entity_type: entityType (required) :param str entity_id: entityId (required) :param str scope: scope (required) - :param str request_body: requestBody (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'scope', 'request_body'] # noqa: E501 + all_params = ['body', 'entity_type', 'entity_id', 'scope'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1557,9 +1571,17 @@ def save_entity_telemetry_using_post_with_http_info(self, entity_type, entity_id 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_entity_telemetry_using_post" % key + ) params[key] = val del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_entity_telemetry_using_post`") # noqa: E501 # verify the required parameter 'entity_type' is set if ('entity_type' not in params or params['entity_type'] is None): @@ -1572,10 +1594,6 @@ def save_entity_telemetry_using_post_with_http_info(self, entity_type, entity_id if ('scope' not in params or params['scope'] is None): raise ValueError("Missing the required parameter `scope` when calling `save_entity_telemetry_using_post`") # noqa: E501 - # verify the required parameter 'request_body' is set - if ('request_body' not in params or - params['request_body'] is None): - raise ValueError("Missing the required parameter `request_body` when calling `save_entity_telemetry_using_post`") # noqa: E501 collection_formats = {} @@ -1595,8 +1613,8 @@ def save_entity_telemetry_using_post_with_http_info(self, entity_type, entity_id local_var_files = {} body_params = None - if 'request_body' in params: - body_params = params['request_body'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -1624,51 +1642,51 @@ def save_entity_telemetry_using_post_with_http_info(self, entity_type, entity_id _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_entity_telemetry_with_ttl_using_post(self, entity_type, entity_id, scope, ttl, request_body, **kwargs): # noqa: E501 + def save_entity_telemetry_with_ttl_using_post(self, body, entity_type, entity_id, scope, ttl, **kwargs): # noqa: E501 """saveEntityTelemetryWithTTL # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_telemetry_with_ttl_using_post(entity_type, entity_id, scope, ttl, request_body, async_req=True) + >>> thread = api.save_entity_telemetry_with_ttl_using_post(body, entity_type, entity_id, scope, ttl, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: requestBody (required) :param str entity_type: entityType (required) :param str entity_id: entityId (required) :param str scope: scope (required) :param int ttl: ttl (required) - :param str request_body: requestBody (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.save_entity_telemetry_with_ttl_using_post_with_http_info(entity_type, entity_id, scope, ttl, request_body, **kwargs) # noqa: E501 + return self.save_entity_telemetry_with_ttl_using_post_with_http_info(body, entity_type, entity_id, scope, ttl, **kwargs) # noqa: E501 else: - (data) = self.save_entity_telemetry_with_ttl_using_post_with_http_info(entity_type, entity_id, scope, ttl, request_body, **kwargs) # noqa: E501 + (data) = self.save_entity_telemetry_with_ttl_using_post_with_http_info(body, entity_type, entity_id, scope, ttl, **kwargs) # noqa: E501 return data - def save_entity_telemetry_with_ttl_using_post_with_http_info(self, entity_type, entity_id, scope, ttl, request_body, **kwargs): # noqa: E501 + def save_entity_telemetry_with_ttl_using_post_with_http_info(self, body, entity_type, entity_id, scope, ttl, **kwargs): # noqa: E501 """saveEntityTelemetryWithTTL # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_telemetry_with_ttl_using_post_with_http_info(entity_type, entity_id, scope, ttl, request_body, async_req=True) + >>> thread = api.save_entity_telemetry_with_ttl_using_post_with_http_info(body, entity_type, entity_id, scope, ttl, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: requestBody (required) :param str entity_type: entityType (required) :param str entity_id: entityId (required) :param str scope: scope (required) :param int ttl: ttl (required) - :param str request_body: requestBody (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'scope', 'ttl', 'request_body'] # noqa: E501 + all_params = ['body', 'entity_type', 'entity_id', 'scope', 'ttl'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1676,9 +1694,17 @@ def save_entity_telemetry_with_ttl_using_post_with_http_info(self, entity_type, 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_entity_telemetry_with_ttl_using_post" % key + ) params[key] = val del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_entity_telemetry_with_ttl_using_post`") # noqa: E501 # verify the required parameter 'entity_type' is set if ('entity_type' not in params or params['entity_type'] is None): @@ -1695,10 +1721,6 @@ def save_entity_telemetry_with_ttl_using_post_with_http_info(self, entity_type, if ('ttl' not in params or params['ttl'] is None): raise ValueError("Missing the required parameter `ttl` when calling `save_entity_telemetry_with_ttl_using_post`") # noqa: E501 - # verify the required parameter 'request_body' is set - if ('request_body' not in params or - params['request_body'] is None): - raise ValueError("Missing the required parameter `request_body` when calling `save_entity_telemetry_with_ttl_using_post`") # noqa: E501 collection_formats = {} @@ -1720,8 +1742,8 @@ def save_entity_telemetry_with_ttl_using_post_with_http_info(self, entity_type, local_var_files = {} body_params = None - if 'request_body' in params: - body_params = params['request_body'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 4625ed31..ff74f3d4 100644 --- a/tb_rest_client/api/api_ce/tenant_controller_api.py +++ b/tb_rest_client/api/api_ce/tenant_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class TenantControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def delete_tenant_using_delete(self, tenant_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_tenant_using_delete(tenant_id, async_req=True) + >>> thread = api.delete_tenant_using_delete(tenant_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +58,7 @@ def delete_tenant_using_delete_with_http_info(self, tenant_id, **kwargs): # noq This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_tenant_using_delete_with_http_info(tenant_id, async_req=True) + >>> thread = api.delete_tenant_using_delete_with_http_info(tenant_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,13 +76,17 @@ def delete_tenant_using_delete_with_http_info(self, tenant_id, **kwargs): # noq 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_using_delete" % 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 `delete_tenant_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `tenant_id` when calling `delete_tenant_using_delete`") # noqa: E501 collection_formats = {} @@ -100,14 +102,6 @@ def delete_tenant_using_delete_with_http_info(self, tenant_id, **kwargs): # noq local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -132,7 +126,7 @@ def get_tenant_by_id_using_get(self, tenant_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_by_id_using_get(tenant_id, async_req=True) + >>> thread = api.get_tenant_by_id_using_get(tenant_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -153,7 +147,7 @@ def get_tenant_by_id_using_get_with_http_info(self, tenant_id, **kwargs): # noq This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_by_id_using_get_with_http_info(tenant_id, async_req=True) + >>> thread = api.get_tenant_by_id_using_get_with_http_info(tenant_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -171,13 +165,17 @@ def get_tenant_by_id_using_get_with_http_info(self, tenant_id, **kwargs): # noq 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_by_id_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_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `tenant_id` when calling `get_tenant_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -197,10 +195,6 @@ def get_tenant_by_id_using_get_with_http_info(self, tenant_id, **kwargs): # noq header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -220,51 +214,43 @@ def get_tenant_by_id_using_get_with_http_info(self, tenant_id, **kwargs): # noq _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenants_using_get(self, page_size, page, **kwargs): # noqa: E501 - """getTenants # noqa: E501 + def get_tenant_info_by_id_using_get(self, tenant_id, **kwargs): # noqa: E501 + """getTenantInfoById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenants_using_get(page_size, page, async_req=True) + >>> thread = api.get_tenant_info_by_id_using_get(tenant_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataTenant + :param str tenant_id: tenantId (required) + :return: TenantInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_tenants_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.get_tenant_info_by_id_using_get_with_http_info(tenant_id, **kwargs) # noqa: E501 else: - (data) = self.get_tenants_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.get_tenant_info_by_id_using_get_with_http_info(tenant_id, **kwargs) # noqa: E501 return data - def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """getTenants # noqa: E501 + def get_tenant_info_by_id_using_get_with_http_info(self, tenant_id, **kwargs): # noqa: E501 + """getTenantInfoById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenants_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_tenant_info_by_id_using_get_with_http_info(tenant_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataTenant + :param str tenant_id: tenantId (required) + :return: TenantInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501 + all_params = ['tenant_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -272,33 +258,25 @@ def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # no 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_info_by_id_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_tenants_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_tenants_using_get`") # noqa: E501 + # 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_info_by_id_using_get`") # noqa: E501 collection_formats = {} path_params = {} + if 'tenant_id' in params: + path_params['tenantId'] = params['tenant_id'] # noqa: E501 query_params = [] - 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 '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 = {} @@ -310,22 +288,18 @@ def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # no header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/tenants{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/tenant/info/{tenantId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataTenant', # noqa: E501 + response_type='TenantInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -333,43 +307,51 @@ def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # no _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_tenant_using_post(self, tenant, **kwargs): # noqa: E501 - """saveTenant # noqa: E501 + def get_tenant_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """getTenantInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_tenant_using_post(tenant, async_req=True) + >>> thread = api.get_tenant_infos_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param Tenant tenant: tenant (required) - :return: Tenant + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataTenantInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_tenant_using_post_with_http_info(tenant, **kwargs) # noqa: E501 + return self.get_tenant_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: - (data) = self.save_tenant_using_post_with_http_info(tenant, **kwargs) # noqa: E501 + (data) = self.get_tenant_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def save_tenant_using_post_with_http_info(self, tenant, **kwargs): # noqa: E501 - """saveTenant # noqa: E501 + def get_tenant_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getTenantInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_tenant_using_post_with_http_info(tenant, async_req=True) + >>> thread = api.get_tenant_infos_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param Tenant tenant: tenant (required) - :return: Tenant + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataTenantInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['tenant'] # 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') @@ -377,19 +359,37 @@ def save_tenant_using_post_with_http_info(self, tenant, **kwargs): # noqa: E501 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_infos_using_get" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'tenant' is set - if ('tenant' not in params or - params['tenant'] is None): - raise ValueError( - "Missing the required parameter `tenant` when calling `save_tenant_using_post`") # 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_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_infos_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + 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 '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 = {} @@ -397,28 +397,22 @@ def save_tenant_using_post_with_http_info(self, tenant, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'tenant' in params: - body_params = params['tenant'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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', 'POST', + '/api/tenantInfos{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Tenant', # noqa: E501 + response_type='PageDataTenantInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -426,44 +420,51 @@ def save_tenant_using_post_with_http_info(self, tenant, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_info_by_id_using_get(self, tenant_id, **kwargs): - """getTenantInfoById # noqa: E501 + def get_tenants_using_get(self, page_size, page, **kwargs): # noqa: E501 + """getTenants # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_info_by_id_using_get(tenant_id, async_req=True) + >>> thread = api.get_tenants_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_id: tenantId (required) - :return: Tenant + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataTenant 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_info_by_id_using_get_with_http_info(tenant_id, **kwargs) # noqa: E501 + return self.get_tenants_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_tenant_info_by_id_using_get_with_http_info(tenant_id, **kwargs) # noqa: E501 + (data) = self.get_tenants_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def get_tenant_info_by_id_using_get_with_http_info(self, tenant_id, **kwargs): - """getTenantInfoById # noqa: E501 + def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getTenants # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_info_by_id_using_get_with_http_info(tenant_id, async_req=True) + >>> thread = api.get_tenants_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_id: tenantId (required) - :return: Tenant + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataTenant If the method is called asynchronously, returns the request thread. """ - all_params = ['tenant_id'] # 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') @@ -471,22 +472,37 @@ def get_tenant_info_by_id_using_get_with_http_info(self, tenant_id, **kwargs): 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_tenants_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_info_by_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_tenants_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_tenants_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'tenant_id' in params: - path_params['tenantId'] = params['tenant_id'] # noqa: E501 - query_params = [] + 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 '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 = {} @@ -494,27 +510,22 @@ def get_tenant_info_by_id_using_get_with_http_info(self, tenant_id, **kwargs): local_var_files = {} body_params = None - # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/info/{tenantId}', 'GET', + '/api/tenants{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Tenant', # noqa: E501 + response_type='PageDataTenant', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -522,52 +533,43 @@ def get_tenant_info_by_id_using_get_with_http_info(self, tenant_id, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_infos_using_get(self, page_size, page, **kwargs): - """getTenantInfos # noqa: E501 + def save_tenant_using_post(self, body, **kwargs): # noqa: E501 + """saveTenant # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_infos_using_get(page_size, page, async_req=True) + >>> thread = api.save_tenant_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: list[Tenant] + :param Tenant body: tenant (required) + :return: Tenant 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_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.save_tenant_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.get_tenant_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.save_tenant_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def get_tenant_infos_using_get_with_http_info(self, page_size, page, **kwargs): - """getTenantInfos # noqa: E501 + def save_tenant_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveTenant # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.save_tenant_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: list[Tenant] + :param Tenant body: tenant (required) + :return: Tenant If the method is called asynchronously, returns the request thread. """ - all_params = ['text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -575,34 +577,23 @@ def get_tenant_infos_using_get_with_http_info(self, page_size, page, **kwargs): 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_tenant_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_tenant_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_infos_using_get`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_tenant_using_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - 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 '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 = {} @@ -610,7 +601,8 @@ def get_tenant_infos_using_get_with_http_info(self, page_size, page, **kwargs): 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( ['*/*']) # noqa: E501 @@ -623,14 +615,14 @@ def get_tenant_infos_using_get_with_http_info(self, page_size, page, **kwargs): auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/tenantInfos{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/tenant', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Tenant]', # noqa: E501 + response_type='Tenant', # 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/tenant_profile_controller_api.py b/tb_rest_client/api/api_ce/tenant_profile_controller_api.py index c17f32e9..75dce3a5 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 @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -85,8 +84,8 @@ def delete_tenant_profile_using_delete_with_http_info(self, tenant_profile_id, * params[key] = val del params['kwargs'] # verify the required parameter 'tenant_profile_id' is set - if self.api_client.client_side_validation and ('tenant_profile_id' not in params or - params['tenant_profile_id'] is None): # noqa: E501 + if ('tenant_profile_id' not in params or + params['tenant_profile_id'] is None): raise ValueError("Missing the required parameter `tenant_profile_id` when calling `delete_tenant_profile_using_delete`") # noqa: E501 collection_formats = {} @@ -103,14 +102,6 @@ def delete_tenant_profile_using_delete_with_http_info(self, tenant_profile_id, * local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -196,10 +187,6 @@ def get_default_tenant_profile_info_using_get_with_http_info(self, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -271,8 +258,8 @@ def get_tenant_profile_by_id_using_get_with_http_info(self, tenant_profile_id, * params[key] = val del params['kwargs'] # verify the required parameter 'tenant_profile_id' is set - if self.api_client.client_side_validation and ('tenant_profile_id' not in params or - params['tenant_profile_id'] is None): # noqa: E501 + if ('tenant_profile_id' not in params or + params['tenant_profile_id'] is None): raise ValueError("Missing the required parameter `tenant_profile_id` when calling `get_tenant_profile_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -293,10 +280,6 @@ def get_tenant_profile_by_id_using_get_with_http_info(self, tenant_profile_id, * header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -368,8 +351,8 @@ def get_tenant_profile_info_by_id_using_get_with_http_info(self, tenant_profile_ params[key] = val del params['kwargs'] # verify the required parameter 'tenant_profile_id' is set - if self.api_client.client_side_validation and ('tenant_profile_id' not in params or - params['tenant_profile_id'] is None): # noqa: E501 + if ('tenant_profile_id' not in params or + params['tenant_profile_id'] is None): raise ValueError("Missing the required parameter `tenant_profile_id` when calling `get_tenant_profile_info_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -390,10 +373,6 @@ def get_tenant_profile_info_by_id_using_get_with_http_info(self, tenant_profile_ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -473,12 +452,12 @@ def get_tenant_profile_infos_using_get_with_http_info(self, page_size, page, **k params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_profile_infos_using_get`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_tenant_profile_infos_using_get`") # noqa: E501 collection_formats = {} @@ -507,10 +486,6 @@ def get_tenant_profile_infos_using_get_with_http_info(self, page_size, page, **k header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -590,12 +565,12 @@ def get_tenant_profiles_using_get_with_http_info(self, page_size, page, **kwargs params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set - if self.api_client.client_side_validation and ('page_size' not in params or - params['page_size'] is None): # noqa: E501 + if ('page_size' not in params or + params['page_size'] is None): raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_profiles_using_get`") # noqa: E501 # verify the required parameter 'page' is set - if self.api_client.client_side_validation and ('page' not in params or - params['page'] is None): # noqa: E501 + if ('page' not in params or + params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_tenant_profiles_using_get`") # noqa: E501 collection_formats = {} @@ -624,10 +599,6 @@ def get_tenant_profiles_using_get_with_http_info(self, page_size, page, **kwargs header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -647,43 +618,43 @@ def get_tenant_profiles_using_get_with_http_info(self, page_size, page, **kwargs _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_tenant_profile_using_post(self, tenant_profile, **kwargs): # noqa: E501 + def save_tenant_profile_using_post(self, body, **kwargs): # noqa: E501 """saveTenantProfile # 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(tenant_profile, async_req=True) + >>> thread = api.save_tenant_profile_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param TenantProfile tenant_profile: tenantProfile (required) + :param TenantProfile body: tenantProfile (required) :return: TenantProfile If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_tenant_profile_using_post_with_http_info(tenant_profile, **kwargs) # noqa: E501 + return self.save_tenant_profile_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_tenant_profile_using_post_with_http_info(tenant_profile, **kwargs) # noqa: E501 + (data) = self.save_tenant_profile_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_tenant_profile_using_post_with_http_info(self, tenant_profile, **kwargs): # noqa: E501 + def save_tenant_profile_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveTenantProfile # 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(tenant_profile, async_req=True) + >>> thread = api.save_tenant_profile_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param TenantProfile tenant_profile: tenantProfile (required) + :param TenantProfile body: tenantProfile (required) :return: TenantProfile If the method is called asynchronously, returns the request thread. """ - all_params = ['tenant_profile'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -698,10 +669,10 @@ def save_tenant_profile_using_post_with_http_info(self, tenant_profile, **kwargs ) params[key] = val del params['kwargs'] - # verify the required parameter 'tenant_profile' is set - if self.api_client.client_side_validation and ('tenant_profile' not in params or - params['tenant_profile'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `tenant_profile` when calling `save_tenant_profile_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_tenant_profile_using_post`") # noqa: E501 collection_formats = {} @@ -715,8 +686,8 @@ def save_tenant_profile_using_post_with_http_info(self, tenant_profile, **kwargs local_var_files = {} body_params = None - if 'tenant_profile' in params: - body_params = params['tenant_profile'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -796,8 +767,8 @@ def set_default_tenant_profile_using_post_with_http_info(self, tenant_profile_id params[key] = val del params['kwargs'] # verify the required parameter 'tenant_profile_id' is set - if self.api_client.client_side_validation and ('tenant_profile_id' not in params or - params['tenant_profile_id'] is None): # noqa: E501 + if ('tenant_profile_id' not in params or + params['tenant_profile_id'] is None): raise ValueError("Missing the required parameter `tenant_profile_id` when calling `set_default_tenant_profile_using_post`") # noqa: E501 collection_formats = {} @@ -818,10 +789,6 @@ def set_default_tenant_profile_using_post_with_http_info(self, tenant_profile_id header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -839,4 +806,4 @@ def set_default_tenant_profile_using_post_with_http_info(self, tenant_profile_id _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_ce/user_controller_api.py b/tb_rest_client/api/api_ce/user_controller_api.py index b22083dc..c7469982 100644 --- a/tb_rest_client/api/api_ce/user_controller_api.py +++ b/tb_rest_client/api/api_ce/user_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -23,11 +19,11 @@ from tb_rest_client.api_client import ApiClient -ACTIVATION_TOKEN_REGEX = "/api/noauth/activate?activateToken=" - class UserControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -41,7 +37,7 @@ def delete_user_using_delete(self, user_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_user_using_delete(user_id, async_req=True) + >>> thread = api.delete_user_using_delete(user_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -62,7 +58,7 @@ def delete_user_using_delete_with_http_info(self, user_id, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_user_using_delete_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 @@ -80,7 +76,11 @@ def delete_user_using_delete_with_http_info(self, user_id, **kwargs): # noqa: E 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_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'user_id' is set @@ -102,14 +102,6 @@ def delete_user_using_delete_with_http_info(self, user_id, **kwargs): # noqa: E local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -129,107 +121,12 @@ 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_token_using_get(self, user_id, **kwargs): # noqa: E501 - """getActivationLink # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_activation_link_using_get(user_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: userId (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_activation_token_using_get_with_http_info(user_id, **kwargs) # noqa: E501 - else: - (data) = self.get_activation_token_using_get_with_http_info(user_id, **kwargs) # noqa: E501 - return data - - def get_activation_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E501 - """getActivationLink # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_activation_link_using_get_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: userId (required) - :return: str - 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']): - - 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 - - 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( - ['text/plain']) # 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 - - activation_link = self.api_client.call_api( - '/api/user/{userId}/activationLink', '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) - - return activation_link[activation_link.index(ACTIVATION_TOKEN_REGEX)+len(ACTIVATION_TOKEN_REGEX):] - def get_activation_link_using_get(self, user_id, **kwargs): # noqa: E501 """getActivationLink # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_activation_link_using_get(user_id, async_req=True) + >>> thread = api.get_activation_link_using_get(user_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -250,7 +147,7 @@ def get_activation_link_using_get_with_http_info(self, user_id, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_activation_link_using_get_with_http_info(user_id, 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 @@ -268,7 +165,11 @@ def get_activation_link_using_get_with_http_info(self, user_id, **kwargs): # no 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_activation_link_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'user_id' is set @@ -294,10 +195,6 @@ def get_activation_link_using_get_with_http_info(self, user_id, **kwargs): # no header_params['Accept'] = self.api_client.select_header_accept( ['text/plain']) # 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 @@ -322,17 +219,17 @@ def get_customer_users_using_get(self, customer_id, page_size, page, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_users_using_get(customer_id, page_size, page, 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: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataUser + :return: PageDataUser If the method is called asynchronously, returns the request thread. """ @@ -348,22 +245,22 @@ def get_customer_users_using_get_with_http_info(self, customer_id, page_size, pa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_users_using_get_with_http_info(customer_id, page_size, page, 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: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataUser + :return: PageDataUser If the method is called asynchronously, returns the request thread. """ - all_params = ['customer_id', 'text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501 + 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') @@ -371,7 +268,11 @@ def get_customer_users_using_get_with_http_info(self, customer_id, page_size, pa 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 @@ -415,10 +316,6 @@ def get_customer_users_using_get_with_http_info(self, customer_id, page_size, pa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -430,7 +327,7 @@ def get_customer_users_using_get_with_http_info(self, customer_id, page_size, pa body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataUser', # noqa: E501 + 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'), @@ -443,17 +340,17 @@ def get_tenant_admins_using_get(self, tenant_id, page_size, page, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_admins_using_get(tenant_id, page_size, page, 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: tenantId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataUser + :return: PageDataUser If the method is called asynchronously, returns the request thread. """ @@ -469,22 +366,22 @@ def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_admins_using_get_with_http_info(tenant_id, page_size, page, 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: tenantId (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataUser + :return: PageDataUser If the method is called asynchronously, returns the request thread. """ - all_params = ['tenant_id', 'text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # noqa: E501 + 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') @@ -492,7 +389,11 @@ def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, 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 @@ -536,10 +437,6 @@ def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -551,7 +448,7 @@ def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataUser', # noqa: E501 + 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'), @@ -564,7 +461,7 @@ def get_user_by_id_using_get(self, user_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_by_id_using_get(user_id, async_req=True) + >>> thread = api.get_user_by_id_using_get(user_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -585,7 +482,7 @@ def get_user_by_id_using_get_with_http_info(self, user_id, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_by_id_using_get_with_http_info(user_id, 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 @@ -603,7 +500,11 @@ def get_user_by_id_using_get_with_http_info(self, user_id, **kwargs): # noqa: E 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 @@ -629,10 +530,6 @@ def get_user_by_id_using_get_with_http_info(self, user_id, **kwargs): # noqa: E header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -657,7 +554,7 @@ def get_user_token_using_get(self, user_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_token_using_get(user_id, async_req=True) + >>> thread = api.get_user_token_using_get(user_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -678,7 +575,7 @@ def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_token_using_get_with_http_info(user_id, 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 @@ -696,7 +593,11 @@ def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E 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 @@ -722,10 +623,6 @@ def get_user_token_using_get_with_http_info(self, user_id, **kwargs): # noqa: E header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -745,12 +642,125 @@ 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 + """getUsers # noqa: 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 str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :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 + """getUsers # noqa: 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 str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :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 '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 '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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/users{?textSearch,sortProperty,sortOrder,pageSize,page}', '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 """isUserTokenAccessEnabled # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.is_user_token_access_enabled_using_get(async_req=True) + >>> thread = api.is_user_token_access_enabled_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -770,7 +780,7 @@ def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.is_user_token_access_enabled_using_get_with_http_info(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 @@ -787,7 +797,11 @@ def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # no 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_user_token_access_enabled_using_get" % key + ) params[key] = val del params['kwargs'] @@ -807,10 +821,6 @@ def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # no header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -830,16 +840,16 @@ def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # no _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_user_using_post(self, user, **kwargs): # noqa: E501 + def save_user_using_post(self, body, **kwargs): # noqa: E501 """saveUser # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_user_using_post(user, async_req=True) + >>> thread = api.save_user_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param User user: user (required) + :param User body: user (required) :param bool send_activation_mail: sendActivationMail :return: User If the method is called asynchronously, @@ -847,28 +857,28 @@ def save_user_using_post(self, user, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_user_using_post_with_http_info(user, **kwargs) # noqa: E501 + return self.save_user_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_user_using_post_with_http_info(user, **kwargs) # noqa: E501 + (data) = self.save_user_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_user_using_post_with_http_info(self, user, **kwargs): # noqa: E501 + def save_user_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveUser # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_user_using_post_with_http_info(user, async_req=True) + >>> thread = api.save_user_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param User user: user (required) + :param User body: user (required) :param bool send_activation_mail: sendActivationMail :return: User If the method is called asynchronously, returns the request thread. """ - all_params = ['user', 'send_activation_mail'] # noqa: E501 + all_params = ['body', 'send_activation_mail'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -876,13 +886,17 @@ def save_user_using_post_with_http_info(self, user, **kwargs): # noqa: E501 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_user_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `save_user_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_user_using_post`") # noqa: E501 collection_formats = {} @@ -898,8 +912,8 @@ def save_user_using_post_with_http_info(self, user, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -932,7 +946,7 @@ def send_activation_email_using_post(self, email, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.send_activation_email_using_post(email, async_req=True) + >>> thread = api.send_activation_email_using_post(email, async_req=True) >>> result = thread.get() :param async_req bool @@ -953,7 +967,7 @@ def send_activation_email_using_post_with_http_info(self, email, **kwargs): # n This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.send_activation_email_using_post_with_http_info(email, async_req=True) + >>> thread = api.send_activation_email_using_post_with_http_info(email, async_req=True) >>> result = thread.get() :param async_req bool @@ -971,7 +985,11 @@ def send_activation_email_using_post_with_http_info(self, email, **kwargs): # n 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 send_activation_email_using_post" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'email' is set @@ -993,14 +1011,6 @@ def send_activation_email_using_post_with_http_info(self, email, **kwargs): # n local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -1025,7 +1035,7 @@ def set_user_credentials_enabled_using_post(self, user_id, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.set_user_credentials_enabled_using_post(user_id, async_req=True) + >>> thread = api.set_user_credentials_enabled_using_post(user_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -1047,7 +1057,7 @@ def set_user_credentials_enabled_using_post_with_http_info(self, user_id, **kwar This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.set_user_credentials_enabled_using_post_with_http_info(user_id, async_req=True) + >>> thread = api.set_user_credentials_enabled_using_post_with_http_info(user_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -1066,7 +1076,11 @@ def set_user_credentials_enabled_using_post_with_http_info(self, user_id, **kwar 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_user_credentials_enabled_using_post" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'user_id' is set @@ -1090,14 +1104,6 @@ def set_user_credentials_enabled_using_post_with_http_info(self, user_id, **kwar local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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_ce/widget_type_controller_api.py b/tb_rest_client/api/api_ce/widget_type_controller_api.py index 67bc4760..9637301b 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class WidgetTypeControllerApi(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 """ @@ -39,7 +37,7 @@ def delete_widget_type_using_delete(self, widget_type_id, **kwargs): # noqa: E5 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_widget_type_using_delete(widget_type_id, async_req=True) + >>> thread = api.delete_widget_type_using_delete(widget_type_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +58,7 @@ def delete_widget_type_using_delete_with_http_info(self, widget_type_id, **kwarg This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_widget_type_using_delete_with_http_info(widget_type_id, async_req=True) + >>> thread = api.delete_widget_type_using_delete_with_http_info(widget_type_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,13 +76,17 @@ def delete_widget_type_using_delete_with_http_info(self, widget_type_id, **kwarg 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_widget_type_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'widget_type_id' is set if ('widget_type_id' not in params or params['widget_type_id'] is None): - raise ValueError( - "Missing the required parameter `widget_type_id` when calling `delete_widget_type_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `widget_type_id` when calling `delete_widget_type_using_delete`") # noqa: E501 collection_formats = {} @@ -100,14 +102,6 @@ def delete_widget_type_using_delete_with_http_info(self, widget_type_id, **kwarg local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -127,42 +121,40 @@ def delete_widget_type_using_delete_with_http_info(self, widget_type_id, **kwarg _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_bundle_widget_types_using_get(self, is_system, bundle_alias, **kwargs): # noqa: E501 - """getBundleWidgetTypes # noqa: E501 + def get_bundle_widget_types_details_using_get(self, is_system, bundle_alias, **kwargs): # noqa: E501 + """getBundleWidgetTypesDetails # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_bundle_widget_types_using_get(is_system, bundle_alias, async_req=True) + >>> thread = api.get_bundle_widget_types_details_using_get(is_system, bundle_alias, async_req=True) >>> result = thread.get() :param async_req bool :param str is_system: isSystem (required) :param str bundle_alias: bundleAlias (required) - :return: list[WidgetType] + :return: list[WidgetTypeDetails] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_bundle_widget_types_using_get_with_http_info(is_system, bundle_alias, - **kwargs) # noqa: E501 + return self.get_bundle_widget_types_details_using_get_with_http_info(is_system, bundle_alias, **kwargs) # noqa: E501 else: - (data) = self.get_bundle_widget_types_using_get_with_http_info(is_system, bundle_alias, - **kwargs) # noqa: E501 + (data) = self.get_bundle_widget_types_details_using_get_with_http_info(is_system, bundle_alias, **kwargs) # noqa: E501 return data - def get_bundle_widget_types_using_get_with_http_info(self, is_system, bundle_alias, **kwargs): # noqa: E501 - """getBundleWidgetTypes # noqa: E501 + def get_bundle_widget_types_details_using_get_with_http_info(self, is_system, bundle_alias, **kwargs): # noqa: E501 + """getBundleWidgetTypesDetails # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_bundle_widget_types_using_get_with_http_info(is_system, bundle_alias, async_req=True) + >>> thread = api.get_bundle_widget_types_details_using_get_with_http_info(is_system, bundle_alias, async_req=True) >>> result = thread.get() :param async_req bool :param str is_system: isSystem (required) :param str bundle_alias: bundleAlias (required) - :return: list[WidgetType] + :return: list[WidgetTypeDetails] If the method is called asynchronously, returns the request thread. """ @@ -175,18 +167,21 @@ def get_bundle_widget_types_using_get_with_http_info(self, is_system, bundle_ali 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_bundle_widget_types_details_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'is_system' is set if ('is_system' not in params or params['is_system'] is None): - raise ValueError( - "Missing the required parameter `is_system` when calling `get_bundle_widget_types_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `is_system` when calling `get_bundle_widget_types_details_using_get`") # noqa: E501 # verify the required parameter 'bundle_alias' is set if ('bundle_alias' not in params or params['bundle_alias'] is None): - raise ValueError( - "Missing the required parameter `bundle_alias` when calling `get_bundle_widget_types_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `bundle_alias` when calling `get_bundle_widget_types_details_using_get`") # noqa: E501 collection_formats = {} @@ -208,22 +203,18 @@ def get_bundle_widget_types_using_get_with_http_info(self, is_system, bundle_ali header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/widgetTypes{?isSystem,bundleAlias}', 'GET', + '/api/widgetTypesDetails{?isSystem,bundleAlias}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[WidgetType]', # noqa: E501 + response_type='list[WidgetTypeDetails]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -231,43 +222,45 @@ def get_bundle_widget_types_using_get_with_http_info(self, is_system, bundle_ali _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_widget_type_by_id_using_get(self, widget_type_id, **kwargs): # noqa: E501 - """getWidgetTypeById # noqa: E501 + def get_bundle_widget_types_infos_using_get(self, is_system, bundle_alias, **kwargs): # noqa: E501 + """getBundleWidgetTypesInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_widget_type_by_id_using_get(widget_type_id, async_req=True) + >>> thread = api.get_bundle_widget_types_infos_using_get(is_system, bundle_alias, async_req=True) >>> result = thread.get() :param async_req bool - :param str widget_type_id: widgetTypeId (required) - :return: WidgetType + :param str is_system: isSystem (required) + :param str bundle_alias: bundleAlias (required) + :return: list[WidgetTypeInfo] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_widget_type_by_id_using_get_with_http_info(widget_type_id, **kwargs) # noqa: E501 + return self.get_bundle_widget_types_infos_using_get_with_http_info(is_system, bundle_alias, **kwargs) # noqa: E501 else: - (data) = self.get_widget_type_by_id_using_get_with_http_info(widget_type_id, **kwargs) # noqa: E501 + (data) = self.get_bundle_widget_types_infos_using_get_with_http_info(is_system, bundle_alias, **kwargs) # noqa: E501 return data - def get_widget_type_by_id_using_get_with_http_info(self, widget_type_id, **kwargs): # noqa: E501 - """getWidgetTypeById # noqa: E501 + def get_bundle_widget_types_infos_using_get_with_http_info(self, is_system, bundle_alias, **kwargs): # noqa: E501 + """getBundleWidgetTypesInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_widget_type_by_id_using_get_with_http_info(widget_type_id, async_req=True) + >>> thread = api.get_bundle_widget_types_infos_using_get_with_http_info(is_system, bundle_alias, async_req=True) >>> result = thread.get() :param async_req bool - :param str widget_type_id: widgetTypeId (required) - :return: WidgetType + :param str is_system: isSystem (required) + :param str bundle_alias: bundleAlias (required) + :return: list[WidgetTypeInfo] If the method is called asynchronously, returns the request thread. """ - all_params = ['widget_type_id'] # noqa: E501 + all_params = ['is_system', 'bundle_alias'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -275,21 +268,31 @@ def get_widget_type_by_id_using_get_with_http_info(self, widget_type_id, **kwarg 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_bundle_widget_types_infos_using_get" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'widget_type_id' is set - if ('widget_type_id' not in params or - params['widget_type_id'] is None): - raise ValueError( - "Missing the required parameter `widget_type_id` when calling `get_widget_type_by_id_using_get`") # noqa: E501 + # verify the required parameter 'is_system' is set + if ('is_system' not in params or + params['is_system'] is None): + raise ValueError("Missing the required parameter `is_system` when calling `get_bundle_widget_types_infos_using_get`") # noqa: E501 + # verify the required parameter 'bundle_alias' is set + if ('bundle_alias' not in params or + params['bundle_alias'] is None): + raise ValueError("Missing the required parameter `bundle_alias` when calling `get_bundle_widget_types_infos_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'widget_type_id' in params: - path_params['widgetTypeId'] = params['widget_type_id'] # noqa: E501 query_params = [] + if 'is_system' in params: + query_params.append(('isSystem', params['is_system'])) # noqa: E501 + if 'bundle_alias' in params: + query_params.append(('bundleAlias', params['bundle_alias'])) # noqa: E501 header_params = {} @@ -301,22 +304,18 @@ def get_widget_type_by_id_using_get_with_http_info(self, widget_type_id, **kwarg header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/widgetType/{widgetTypeId}', 'GET', + '/api/widgetTypesInfos{?isSystem,bundleAlias}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='WidgetType', # noqa: E501 + response_type='list[WidgetTypeInfo]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -324,48 +323,45 @@ def get_widget_type_by_id_using_get_with_http_info(self, widget_type_id, **kwarg _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_widget_type_using_get(self, is_system, bundle_alias, alias, **kwargs): # noqa: E501 - """getWidgetType # noqa: E501 + def get_bundle_widget_types_using_get(self, is_system, bundle_alias, **kwargs): # noqa: E501 + """getBundleWidgetTypes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_widget_type_using_get(is_system, bundle_alias, alias, async_req=True) + >>> thread = api.get_bundle_widget_types_using_get(is_system, bundle_alias, async_req=True) >>> result = thread.get() :param async_req bool :param str is_system: isSystem (required) :param str bundle_alias: bundleAlias (required) - :param str alias: alias (required) - :return: WidgetType + :return: list[WidgetType] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_widget_type_using_get_with_http_info(is_system, bundle_alias, alias, **kwargs) # noqa: E501 + return self.get_bundle_widget_types_using_get_with_http_info(is_system, bundle_alias, **kwargs) # noqa: E501 else: - (data) = self.get_widget_type_using_get_with_http_info(is_system, bundle_alias, alias, - **kwargs) # noqa: E501 + (data) = self.get_bundle_widget_types_using_get_with_http_info(is_system, bundle_alias, **kwargs) # noqa: E501 return data - def get_widget_type_using_get_with_http_info(self, is_system, bundle_alias, alias, **kwargs): # noqa: E501 - """getWidgetType # noqa: E501 + def get_bundle_widget_types_using_get_with_http_info(self, is_system, bundle_alias, **kwargs): # noqa: E501 + """getBundleWidgetTypes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_widget_type_using_get_with_http_info(is_system, bundle_alias, alias, async_req=True) + >>> thread = api.get_bundle_widget_types_using_get_with_http_info(is_system, bundle_alias, async_req=True) >>> result = thread.get() :param async_req bool :param str is_system: isSystem (required) :param str bundle_alias: bundleAlias (required) - :param str alias: alias (required) - :return: WidgetType + :return: list[WidgetType] If the method is called asynchronously, returns the request thread. """ - all_params = ['is_system', 'bundle_alias', 'alias'] # noqa: E501 + all_params = ['is_system', 'bundle_alias'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -373,23 +369,21 @@ def get_widget_type_using_get_with_http_info(self, is_system, bundle_alias, alia 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_bundle_widget_types_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'is_system' is set if ('is_system' not in params or params['is_system'] is None): - raise ValueError( - "Missing the required parameter `is_system` when calling `get_widget_type_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `is_system` when calling `get_bundle_widget_types_using_get`") # noqa: E501 # verify the required parameter 'bundle_alias' is set if ('bundle_alias' not in params or params['bundle_alias'] is None): - raise ValueError( - "Missing the required parameter `bundle_alias` when calling `get_widget_type_using_get`") # noqa: E501 - # verify the required parameter 'alias' is set - if ('alias' not in params or - params['alias'] is None): - raise ValueError( - "Missing the required parameter `alias` when calling `get_widget_type_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `bundle_alias` when calling `get_bundle_widget_types_using_get`") # noqa: E501 collection_formats = {} @@ -400,8 +394,6 @@ def get_widget_type_using_get_with_http_info(self, is_system, bundle_alias, alia query_params.append(('isSystem', params['is_system'])) # noqa: E501 if 'bundle_alias' in params: query_params.append(('bundleAlias', params['bundle_alias'])) # noqa: E501 - if 'alias' in params: - query_params.append(('alias', params['alias'])) # noqa: E501 header_params = {} @@ -413,22 +405,18 @@ def get_widget_type_using_get_with_http_info(self, is_system, bundle_alias, alia header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/widgetType{?isSystem,bundleAlias,alias}', 'GET', + '/api/widgetTypes{?isSystem,bundleAlias}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='WidgetType', # noqa: E501 + response_type='list[WidgetType]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -436,43 +424,43 @@ def get_widget_type_using_get_with_http_info(self, is_system, bundle_alias, alia _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_widget_type_using_post(self, widget_type, **kwargs): # noqa: E501 - """saveWidgetType # noqa: E501 + def get_widget_type_by_id_using_get(self, widget_type_id, **kwargs): # noqa: E501 + """getWidgetTypeById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_widget_type_using_post(widget_type, async_req=True) + >>> thread = api.get_widget_type_by_id_using_get(widget_type_id, async_req=True) >>> result = thread.get() :param async_req bool - :param WidgetType widget_type: widgetType (required) - :return: WidgetType + :param str widget_type_id: widgetTypeId (required) + :return: WidgetTypeDetails If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_widget_type_using_post_with_http_info(widget_type, **kwargs) # noqa: E501 + return self.get_widget_type_by_id_using_get_with_http_info(widget_type_id, **kwargs) # noqa: E501 else: - (data) = self.save_widget_type_using_post_with_http_info(widget_type, **kwargs) # noqa: E501 + (data) = self.get_widget_type_by_id_using_get_with_http_info(widget_type_id, **kwargs) # noqa: E501 return data - def save_widget_type_using_post_with_http_info(self, widget_type, **kwargs): # noqa: E501 - """saveWidgetType # noqa: E501 + def get_widget_type_by_id_using_get_with_http_info(self, widget_type_id, **kwargs): # noqa: E501 + """getWidgetTypeById # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_widget_type_using_post_with_http_info(widget_type, async_req=True) + >>> thread = api.get_widget_type_by_id_using_get_with_http_info(widget_type_id, async_req=True) >>> result = thread.get() :param async_req bool - :param WidgetType widget_type: widgetType (required) - :return: WidgetType + :param str widget_type_id: widgetTypeId (required) + :return: WidgetTypeDetails If the method is called asynchronously, returns the request thread. """ - all_params = ['widget_type'] # noqa: E501 + all_params = ['widget_type_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -480,17 +468,23 @@ def save_widget_type_using_post_with_http_info(self, widget_type, **kwargs): # 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_widget_type_by_id_using_get" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'widget_type' is set - if ('widget_type' not in params or - params['widget_type'] is None): - raise ValueError( - "Missing the required parameter `widget_type` when calling `save_widget_type_using_post`") # noqa: E501 + # verify the required parameter 'widget_type_id' is set + if ('widget_type_id' not in params or + params['widget_type_id'] is None): + raise ValueError("Missing the required parameter `widget_type_id` when calling `get_widget_type_by_id_using_get`") # noqa: E501 collection_formats = {} path_params = {} + if 'widget_type_id' in params: + path_params['widgetTypeId'] = params['widget_type_id'] # noqa: E501 query_params = [] @@ -500,28 +494,22 @@ def save_widget_type_using_post_with_http_info(self, widget_type, **kwargs): # local_var_files = {} body_params = None - if 'widget_type' in params: - body_params = params['widget_type'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/widgetType', 'POST', + '/api/widgetType/{widgetTypeId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='WidgetType', # noqa: E501 + response_type='WidgetTypeDetails', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -529,48 +517,47 @@ def save_widget_type_using_post_with_http_info(self, widget_type, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_bundle_widget_types_details_using_get(self, is_system, bundle_alias, **kwargs): - """getBundleWidgetTypesDetails # noqa: E501 + def get_widget_type_using_get(self, is_system, bundle_alias, alias, **kwargs): # noqa: E501 + """getWidgetType # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_bundle_widget_types_details_using_get(is_system, bundle_alias, async_req=True) + >>> thread = api.get_widget_type_using_get(is_system, bundle_alias, alias, async_req=True) >>> result = thread.get() :param async_req bool :param str is_system: isSystem (required) :param str bundle_alias: bundleAlias (required) - :return: list[WidgetType] + :param str alias: alias (required) + :return: WidgetType If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_bundle_widget_types_details_using_get_with_http_info(is_system, bundle_alias, - **kwargs) # noqa: E501 + return self.get_widget_type_using_get_with_http_info(is_system, bundle_alias, alias, **kwargs) # noqa: E501 else: - (data) = self.get_bundle_widget_types_details_using_get_with_http_info(is_system, bundle_alias, - **kwargs) # noqa: E501 + (data) = self.get_widget_type_using_get_with_http_info(is_system, bundle_alias, alias, **kwargs) # noqa: E501 return data - def get_bundle_widget_types_details_using_get_with_http_info(self, is_system, bundle_alias, **kwargs): - """getBundleWidgetTypesDetails # noqa: E501 + def get_widget_type_using_get_with_http_info(self, is_system, bundle_alias, alias, **kwargs): # noqa: E501 + """getWidgetType # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_bundle_widget_types_details_using_get_with_http_info(is_system, bundle_alias, async_req=True) + >>> thread = api.get_widget_type_using_get_with_http_info(is_system, bundle_alias, alias, async_req=True) >>> result = thread.get() :param async_req bool :param str is_system: isSystem (required) :param str bundle_alias: bundleAlias (required) - :return: list[WidgetType] + :param str alias: alias (required) + :return: WidgetType If the method is called asynchronously, returns the request thread. """ - all_params = ['is_system', 'bundle_alias'] # noqa: E501 + all_params = ['is_system', 'bundle_alias', 'alias'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -578,29 +565,37 @@ def get_bundle_widget_types_details_using_get_with_http_info(self, is_system, bu 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_widget_type_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'is_system' is set if ('is_system' not in params or params['is_system'] is None): - raise ValueError( - "Missing the required parameter `is_system` when calling `get_bundle_widget_types_details_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `is_system` when calling `get_widget_type_using_get`") # noqa: E501 # verify the required parameter 'bundle_alias' is set if ('bundle_alias' not in params or params['bundle_alias'] is None): - raise ValueError( - "Missing the required parameter `bundle_alias` when calling `get_bundle_widget_types_details_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `bundle_alias` when calling `get_widget_type_using_get`") # noqa: E501 + # verify the required parameter 'alias' is set + if ('alias' not in params or + params['alias'] is None): + raise ValueError("Missing the required parameter `alias` when calling `get_widget_type_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'is_system' in params: query_params.append(('isSystem', params['is_system'])) # noqa: E501 if 'bundle_alias' in params: query_params.append(('bundleAlias', params['bundle_alias'])) # noqa: E501 + if 'alias' in params: + query_params.append(('alias', params['alias'])) # noqa: E501 header_params = {} @@ -608,27 +603,22 @@ def get_bundle_widget_types_details_using_get_with_http_info(self, is_system, bu local_var_files = {} body_params = None - # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/widgetTypesDetails{?isSystem,bundleAlias}', 'GET', + '/api/widgetType{?isSystem,bundleAlias,alias}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[WidgetType]', # noqa: E501 + response_type='WidgetType', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -636,48 +626,43 @@ def get_bundle_widget_types_details_using_get_with_http_info(self, is_system, bu _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_bundle_widget_types_infos_using_get(self, is_system, bundle_alias, **kwargs): - """getBundleWidgetTypesInfos # noqa: E501 + def save_widget_type_using_post(self, body, **kwargs): # noqa: E501 + """saveWidgetType # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_bundle_widget_types_infos_using_get(is_system, bundle_alias, async_req=True) + >>> thread = api.save_widget_type_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str is_system: isSystem (required) - :param str bundle_alias: bundleAlias (required) - :return: list[WidgetType] + :param WidgetTypeDetails body: widgetTypeDetails (required) + :return: WidgetTypeDetails If the method is called asynchronously, returns the request thread. """ - kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_bundle_widget_types_infos_using_get_with_http_info(is_system, bundle_alias, - **kwargs) # noqa: E501 + return self.save_widget_type_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.get_bundle_widget_types_infos_using_get_with_http_info(is_system, bundle_alias, - **kwargs) # noqa: E501 + (data) = self.save_widget_type_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def get_bundle_widget_types_infos_using_get_with_http_info(self, is_system, bundle_alias, **kwargs): - """getBundleWidgetTypesInfos # noqa: E501 + def save_widget_type_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveWidgetType # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_bundle_widget_types_infos_using_get_with_http_info(is_system, bundle_alias, async_req=True) + >>> thread = api.save_widget_type_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str is_system: isSystem (required) - :param str bundle_alias: bundleAlias (required) - :return: list[WidgetType] + :param WidgetTypeDetails body: widgetTypeDetails (required) + :return: WidgetTypeDetails If the method is called asynchronously, returns the request thread. """ - all_params = ['is_system', 'bundle_alias'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -685,18 +670,17 @@ def get_bundle_widget_types_infos_using_get_with_http_info(self, is_system, bund 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_widget_type_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'is_system' is set - if ('is_system' not in params or - params['is_system'] is None): - raise ValueError( - "Missing the required parameter `is_system` when calling `get_bundle_widget_types_details_using_get`") # noqa: E501 - # verify the required parameter 'bundle_alias' is set - if ('bundle_alias' not in params or - params['bundle_alias'] is None): - raise ValueError( - "Missing the required parameter `bundle_alias` when calling `get_bundle_widget_types_details_using_get`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_widget_type_using_post`") # noqa: E501 collection_formats = {} @@ -704,18 +688,14 @@ def get_bundle_widget_types_infos_using_get_with_http_info(self, is_system, bund query_params = [] - if 'is_system' in params: - query_params.append(('isSystem', params['is_system'])) # noqa: E501 - if 'bundle_alias' in params: - query_params.append(('bundleAlias', params['bundle_alias'])) # 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( ['*/*']) # noqa: E501 @@ -728,14 +708,14 @@ def get_bundle_widget_types_infos_using_get_with_http_info(self, is_system, bund auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/widgetTypesInfos{?isSystem,bundleAlias}', 'GET', + '/api/widgetType', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[WidgetType]', # noqa: E501 + response_type='WidgetTypeDetails', # 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/widgets_bundle_controller_api.py b/tb_rest_client/api/api_ce/widgets_bundle_controller_api.py index d601f6f7..32cf0c45 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class WidgetsBundleControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def delete_widgets_bundle_using_delete(self, widgets_bundle_id, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_widgets_bundle_using_delete(widgets_bundle_id, async_req=True) + >>> thread = api.delete_widgets_bundle_using_delete(widgets_bundle_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +58,7 @@ def delete_widgets_bundle_using_delete_with_http_info(self, widgets_bundle_id, * This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_widgets_bundle_using_delete_with_http_info(widgets_bundle_id, async_req=True) + >>> thread = api.delete_widgets_bundle_using_delete_with_http_info(widgets_bundle_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,7 +76,11 @@ def delete_widgets_bundle_using_delete_with_http_info(self, widgets_bundle_id, * 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_widgets_bundle_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'widgets_bundle_id' is set @@ -100,14 +102,6 @@ def delete_widgets_bundle_using_delete_with_http_info(self, widgets_bundle_id, * local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -132,7 +126,7 @@ def get_widgets_bundle_by_id_using_get(self, widgets_bundle_id, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_widgets_bundle_by_id_using_get(widgets_bundle_id, async_req=True) + >>> thread = api.get_widgets_bundle_by_id_using_get(widgets_bundle_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -153,7 +147,7 @@ def get_widgets_bundle_by_id_using_get_with_http_info(self, widgets_bundle_id, * This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_widgets_bundle_by_id_using_get_with_http_info(widgets_bundle_id, async_req=True) + >>> thread = api.get_widgets_bundle_by_id_using_get_with_http_info(widgets_bundle_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -171,7 +165,11 @@ def get_widgets_bundle_by_id_using_get_with_http_info(self, widgets_bundle_id, * 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_bundle_by_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'widgets_bundle_id' is set @@ -197,10 +195,6 @@ def get_widgets_bundle_by_id_using_get_with_http_info(self, widgets_bundle_id, * header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -225,16 +219,16 @@ def get_widgets_bundles_using_get(self, page_size, page, **kwargs): # noqa: E50 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_widgets_bundles_using_get(page_size, page, async_req=True) + >>> thread = api.get_widgets_bundles_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataWidgetsBundle + :return: PageDataWidgetsBundle If the method is called asynchronously, returns the request thread. """ @@ -250,21 +244,21 @@ def get_widgets_bundles_using_get_with_http_info(self, page_size, page, **kwargs This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_widgets_bundles_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_widgets_bundles_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder - :param str page_size: pageSize (required) - :param str page: page (required) - :return: TextPageDataWidgetsBundle + :return: PageDataWidgetsBundle If the method is called asynchronously, returns the request thread. """ - all_params = ['text_search', 'sort_property', 'sort_order', 'page_size', 'page'] # 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') @@ -272,13 +266,21 @@ def get_widgets_bundles_using_get_with_http_info(self, page_size, page, **kwargs 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_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_widgets_bundles_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_widgets_bundles_using_get`") # noqa: E501 collection_formats = {} @@ -306,10 +308,6 @@ def get_widgets_bundles_using_get_with_http_info(self, page_size, page, **kwargs header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -321,7 +319,7 @@ def get_widgets_bundles_using_get_with_http_info(self, page_size, page, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='TextPageDataWidgetsBundle', # noqa: E501 + response_type='PageDataWidgetsBundle', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -334,7 +332,7 @@ def get_widgets_bundles_using_get1(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_widgets_bundles_using_get1(async_req=True) + >>> thread = api.get_widgets_bundles_using_get1(async_req=True) >>> result = thread.get() :param async_req bool @@ -354,7 +352,7 @@ def get_widgets_bundles_using_get1_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_widgets_bundles_using_get1_with_http_info(async_req=True) + >>> thread = api.get_widgets_bundles_using_get1_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -371,7 +369,11 @@ def get_widgets_bundles_using_get1_with_http_info(self, **kwargs): # noqa: E501 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_using_get1" % key + ) params[key] = val del params['kwargs'] @@ -391,10 +393,6 @@ def get_widgets_bundles_using_get1_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -414,43 +412,43 @@ def get_widgets_bundles_using_get1_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_widgets_bundle_using_post(self, widgets_bundle, **kwargs): # noqa: E501 + def save_widgets_bundle_using_post(self, body, **kwargs): # noqa: E501 """saveWidgetsBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_widgets_bundle_using_post(widgets_bundle, async_req=True) + >>> thread = api.save_widgets_bundle_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param WidgetsBundle widgets_bundle: widgetsBundle (required) + :param WidgetsBundle body: widgetsBundle (required) :return: WidgetsBundle If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_widgets_bundle_using_post_with_http_info(widgets_bundle, **kwargs) # noqa: E501 + return self.save_widgets_bundle_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_widgets_bundle_using_post_with_http_info(widgets_bundle, **kwargs) # noqa: E501 + (data) = self.save_widgets_bundle_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_widgets_bundle_using_post_with_http_info(self, widgets_bundle, **kwargs): # noqa: E501 + def save_widgets_bundle_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveWidgetsBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_widgets_bundle_using_post_with_http_info(widgets_bundle, async_req=True) + >>> thread = api.save_widgets_bundle_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param WidgetsBundle widgets_bundle: widgetsBundle (required) + :param WidgetsBundle body: widgetsBundle (required) :return: WidgetsBundle If the method is called asynchronously, returns the request thread. """ - all_params = ['widgets_bundle'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -458,13 +456,17 @@ def save_widgets_bundle_using_post_with_http_info(self, widgets_bundle, **kwargs 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_widgets_bundle_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'widgets_bundle' is set - if ('widgets_bundle' not in params or - params['widgets_bundle'] is None): - raise ValueError("Missing the required parameter `widgets_bundle` when calling `save_widgets_bundle_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_widgets_bundle_using_post`") # noqa: E501 collection_formats = {} @@ -478,8 +480,8 @@ def save_widgets_bundle_using_post_with_http_info(self, widgets_bundle, **kwargs local_var_files = {} body_params = None - if 'widgets_bundle' in params: - body_params = params['widgets_bundle'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 diff --git a/tb_rest_client/api/api_pe/__init__.py b/tb_rest_client/api/api_pe/__init__.py index 1faddac8..36b2220a 100644 --- a/tb_rest_client/api/api_pe/__init__.py +++ b/tb_rest_client/api/api_pe/__init__.py @@ -1,61 +1,52 @@ -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api_pe package -from .admin_controller_api import AdminControllerApi -from .alarm_controller_api import AlarmControllerApi +from .self_registration_controller_api import SelfRegistrationControllerApi +from .http_integration_controller_api import HttpIntegrationControllerApi from .asset_controller_api import AssetControllerApi -from .audit_log_controller_api import AuditLogControllerApi -from .billing_endpoint_controller_api import BillingEndpointControllerApi -from .blob_entity_controller_api import BlobEntityControllerApi -from .cloud_endpoint_controller_api import CloudEndpointControllerApi -from .converter_controller_api import ConverterControllerApi -from .chirp_stack_integration_controller_api import ChirpStackIntegrationControllerApi -from .custom_menu_controller_api import CustomMenuControllerApi -from .custom_translation_controller_api import CustomTranslationControllerApi +from .asset_controller_api import AssetControllerApi +from .device_group_ota_package_controller_api import DeviceGroupOtaPackageControllerApi +from .edge_controller_api import EdgeControllerApi +from .edge_controller_api import EdgeControllerApi +from .ocean_connect_integration_controller_api import OceanConnectIntegrationControllerApi +from .user_permissions_controller_api import UserPermissionsControllerApi +from .owner_controller_api import OwnerControllerApi +from .rpc_v_2_controller_api import RpcV2ControllerApi +from .rpc_v_2_controller_api import RpcV2ControllerApi +from .edge_event_controller_api import EdgeEventControllerApi +from .edge_event_controller_api import EdgeEventControllerApi from .customer_controller_api import CustomerControllerApi -from .dashboard_controller_api import DashboardControllerApi +from .customer_controller_api import CustomerControllerApi +from .user_controller_api import UserControllerApi +from .user_controller_api import UserControllerApi +from .group_permission_controller_api import GroupPermissionControllerApi from .device_controller_api import DeviceControllerApi -from .entity_group_controller_api import EntityGroupControllerApi +from .device_controller_api import DeviceControllerApi +from .converter_controller_api import ConverterControllerApi +from .entity_view_controller_api import EntityViewControllerApi from .entity_view_controller_api import EntityViewControllerApi -from .event_controller_api import EventControllerApi -from .group_permission_controller_api import GroupPermissionControllerApi -from .http_integration_controller_api import HttpIntegrationControllerApi -from .integration_controller_api import IntegrationControllerApi -from .loriot_integration_controller_api import LoriotIntegrationControllerApi -from .ocean_connect_integration_controller_api import OceanConnectIntegrationControllerApi -from .owner_controller_api import OwnerControllerApi -from .report_controller_api import ReportControllerApi -from .role_controller_api import RoleControllerApi -from .rule_chain_controller_api import RuleChainControllerApi from .rule_engine_controller_api import RuleEngineControllerApi -from .scheduler_event_controller_api import SchedulerEventControllerApi -from .self_registration_controller_api import SelfRegistrationControllerApi -from .sig_fox_integration_controller_api import SigFoxIntegrationControllerApi -from .solution_controller_api import SolutionControllerApi -from .subscription_controller_api import SubscriptionControllerApi -from .sign_up_controller_api import SignUpControllerApi +from .admin_controller_api import AdminControllerApi +from .admin_controller_api import AdminControllerApi from .t_mobile_iot_cdp_integration_controller_api import TMobileIotCdpIntegrationControllerApi -from .tenant_controller_api import TenantControllerApi -from .thing_park_integration_controller_api import ThingParkIntegrationControllerApi +from .sign_up_controller_api import SignUpControllerApi +from .sign_up_controller_api import SignUpControllerApi from .trail_controller_api import TrailControllerApi -from .user_controller_api import UserControllerApi -from .user_permissions_controller_api import UserPermissionsControllerApi +from .thing_park_integration_controller_api import ThingParkIntegrationControllerApi +from .sig_fox_integration_controller_api import SigFoxIntegrationControllerApi +from .scheduler_event_controller_api import SchedulerEventControllerApi +from .report_controller_api import ReportControllerApi +from .dashboard_controller_api import DashboardControllerApi +from .dashboard_controller_api import DashboardControllerApi +from .integration_controller_api import IntegrationControllerApi +from .custom_menu_controller_api import CustomMenuControllerApi +from .lwm_2m_controller_api import Lwm2mControllerApi +from .lwm_2m_controller_api import Lwm2mControllerApi +from .custom_translation_controller_api import CustomTranslationControllerApi +from .role_controller_api import RoleControllerApi +from .blob_entity_controller_api import BlobEntityControllerApi +from .loriot_integration_controller_api import LoriotIntegrationControllerApi +from .tenant_controller_api import TenantControllerApi +from .tenant_controller_api import TenantControllerApi +from .chirp_stack_integration_controller_api import ChirpStackIntegrationControllerApi from .white_labeling_controller_api import WhiteLabelingControllerApi -from .widgets_bundle_controller_api import WidgetsBundleControllerApi +from .ota_package_controller_api import OtaPackageControllerApi +from .ota_package_controller_api import OtaPackageControllerApi +from .entity_group_controller_api import EntityGroupControllerApi 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 11c40762..4911da23 100644 --- a/tb_rest_client/api/api_pe/admin_controller_api.py +++ b/tb_rest_client/api/api_pe/admin_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -22,23 +18,111 @@ import six from tb_rest_client.api_client import ApiClient -from tb_rest_client.api.api_ce import AdminControllerApi -class AdminControllerApi(AdminControllerApi): - """NOTE: This class is auto generated by the swagger code generator program. +class AdminControllerApi(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): - super().__init__(api_client) + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def check_updates_using_get(self, **kwargs): # noqa: E501 + """checkUpdates # 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_updates_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: UpdateMessage + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.check_updates_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.check_updates_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def check_updates_using_get_with_http_info(self, **kwargs): # noqa: E501 + """checkUpdates # 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_updates_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: UpdateMessage + 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 check_updates_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/admin/updates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UpdateMessage', # 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_admin_settings_using_get(self, key, **kwargs): # noqa: E501 """getAdminSettings # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_admin_settings_using_get(key, async_req=True) + >>> thread = api.get_admin_settings_using_get(key, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +144,7 @@ def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_admin_settings_using_get_with_http_info(key, async_req=True) + >>> thread = api.get_admin_settings_using_get_with_http_info(key, async_req=True) >>> result = thread.get() :param async_req bool @@ -79,7 +163,11 @@ def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E 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_admin_settings_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'key' is set @@ -107,6 +195,184 @@ def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/admin/settings/{key}{?systemByDefault}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_security_settings_using_get(self, **kwargs): # noqa: E501 + """getSecuritySettings # noqa: 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) + >>> result = thread.get() + + :param async_req 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.get_security_settings_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_security_settings_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_security_settings_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getSecuritySettings # noqa: 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) + >>> result = thread.get() + + :param async_req bool + :return: SecuritySettings + 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_security_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/admin/securitySettings', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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_admin_settings_using_post(self, body, **kwargs): # noqa: E501 + """saveAdminSettings # 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AdminSettings body: adminSettings (required) + :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(body, **kwargs) # noqa: E501 + else: + (data) = self.save_admin_settings_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def save_admin_settings_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveAdminSettings # 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AdminSettings body: adminSettings (required) + :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') + 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_admin_settings_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_admin_settings_using_post`") # noqa: E501 + + 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( + ['*/*']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -115,7 +381,7 @@ def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/admin/settings/{key}{?systemByDefault}', 'GET', + '/api/admin/settings', 'POST', path_params, query_params, header_params, @@ -129,3 +395,286 @@ def get_admin_settings_using_get_with_http_info(self, key, **kwargs): # noqa: E _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def save_security_settings_using_post(self, body, **kwargs): # noqa: E501 + """saveSecuritySettings # 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SecuritySettings body: securitySettings (required) + :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_security_settings_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.save_security_settings_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def save_security_settings_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveSecuritySettings # 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SecuritySettings body: securitySettings (required) + :return: SecuritySettings + 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_security_settings_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_security_settings_using_post`") # noqa: E501 + + 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( + ['*/*']) # 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', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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 send_test_mail_using_post(self, body, **kwargs): # noqa: E501 + """sendTestMail # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_test_mail_using_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AdminSettings body: adminSettings (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.send_test_mail_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.send_test_mail_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def send_test_mail_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """sendTestMail # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_test_mail_using_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AdminSettings body: adminSettings (required) + :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 send_test_mail_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `send_test_mail_using_post`") # noqa: E501 + + 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 `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/testMail', '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 send_test_sms_using_post(self, body, **kwargs): # noqa: E501 + """sendTestSms # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_test_sms_using_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TestSmsRequest body: testSmsRequest (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.send_test_sms_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.send_test_sms_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def send_test_sms_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """sendTestSms # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_test_sms_using_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TestSmsRequest body: testSmsRequest (required) + :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 send_test_sms_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `send_test_sms_using_post`") # noqa: E501 + + 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 `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/testSms', '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/asset_controller_api.py b/tb_rest_client/api/api_pe/asset_controller_api.py index dc2b9722..ed58d03f 100644 --- a/tb_rest_client/api/api_pe/asset_controller_api.py +++ b/tb_rest_client/api/api_pe/asset_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -22,23 +18,390 @@ import six from tb_rest_client.api_client import ApiClient -from tb_rest_client.api.api_ce import AssetControllerApi -class AssetControllerApi(AssetControllerApi): - """NOTE: This class is auto generated by the swagger code generator program. +class AssetControllerApi(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): - super().__init__(api_client) + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_asset_using_delete(self, asset_id, **kwargs): # noqa: E501 + """deleteAsset # 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_using_delete(asset_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_id: assetId (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_using_delete_with_http_info(asset_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_asset_using_delete_with_http_info(asset_id, **kwargs) # noqa: E501 + return data + + def delete_asset_using_delete_with_http_info(self, asset_id, **kwargs): # noqa: E501 + """deleteAsset # 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_using_delete_with_http_info(asset_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_id: assetId (required) + :return: None + 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 delete_asset_using_delete" % 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 `delete_asset_using_delete`") # 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 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/asset/{assetId}', '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 find_by_query_using_post(self, body, **kwargs): # noqa: E501 + """findByQuery # 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_by_query_using_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AssetSearchQuery body: query (required) + :return: list[Asset] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find_by_query_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.find_by_query_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def find_by_query_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """findByQuery # 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_by_query_using_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param AssetSearchQuery body: query (required) + :return: list[Asset] + 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 find_by_query_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_by_query_using_post`") # noqa: E501 + + 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( + ['*/*']) # 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/assets', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Asset]', # 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 + """getAssetById # noqa: 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_by_id_using_get(asset_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_id: assetId (required) + :return: Asset + 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_by_id_using_get_with_http_info(asset_id, **kwargs) # noqa: E501 + else: + (data) = self.get_asset_by_id_using_get_with_http_info(asset_id, **kwargs) # noqa: E501 + return data + + def get_asset_by_id_using_get_with_http_info(self, asset_id, **kwargs): # noqa: E501 + """getAssetById # noqa: 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_by_id_using_get_with_http_info(asset_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_id: assetId (required) + :return: Asset + 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_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_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/asset/{assetId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Asset', # 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 + """getAssetTypes # noqa: 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_types_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[EntitySubtype] + 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_types_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_asset_types_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_asset_types_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getAssetTypes # noqa: 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_types_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[EntitySubtype] + 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_asset_types_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/asset/types', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntitySubtype]', # 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_assets_by_entity_group_id_using_get(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 """getAssetsByEntityGroupId # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_assets_by_entity_group_id_using_get(entity_group_id, page_size, page, async_req=True) + >>> thread = api.get_assets_by_entity_group_id_using_get(entity_group_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -64,7 +427,7 @@ def get_assets_by_entity_group_id_using_get_with_http_info(self, entity_group_id This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_assets_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, async_req=True) + >>> thread = api.get_assets_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 @@ -87,7 +450,11 @@ def get_assets_by_entity_group_id_using_get_with_http_info(self, entity_group_id 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_assets_by_entity_group_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_group_id' is set @@ -103,10 +470,6 @@ def get_assets_by_entity_group_id_using_get_with_http_info(self, entity_group_id params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_assets_by_entity_group_id_using_get`") # noqa: E501 - if 'page_size' in params and params['page_size'] < 1.0: # noqa: E501 - raise ValueError("Invalid value for parameter `page_size` when calling `get_assets_by_entity_group_id_using_get`, must be a value greater than or equal to `1.0`") # noqa: E501 - if 'page' in params and params['page'] < 0.0: # noqa: E501 - raise ValueError("Invalid value for parameter `page` when calling `get_assets_by_entity_group_id_using_get`, must be a value greater than or equal to `0.0`") # noqa: E501 collection_formats = {} path_params = {} @@ -135,10 +498,6 @@ def get_assets_by_entity_group_id_using_get_with_http_info(self, entity_group_id header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -158,12 +517,105 @@ def get_assets_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_assets_by_ids_using_get(self, asset_ids, **kwargs): # noqa: E501 + """getAssetsByIds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_assets_by_ids_using_get(asset_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_ids: assetIds (required) + :return: list[Asset] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_assets_by_ids_using_get_with_http_info(asset_ids, **kwargs) # noqa: E501 + else: + (data) = self.get_assets_by_ids_using_get_with_http_info(asset_ids, **kwargs) # noqa: E501 + return data + + def get_assets_by_ids_using_get_with_http_info(self, asset_ids, **kwargs): # noqa: E501 + """getAssetsByIds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_assets_by_ids_using_get_with_http_info(asset_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_ids: assetIds (required) + :return: list[Asset] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['asset_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_assets_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # 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 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'asset_ids' in params: + query_params.append(('assetIds', params['asset_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/assets{?assetIds}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Asset]', # 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 """getCustomerAssets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_assets_using_get(customer_id, page_size, page, async_req=True) + >>> thread = api.get_customer_assets_using_get(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -190,7 +642,7 @@ def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, p This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_assets_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> thread = api.get_customer_assets_using_get_with_http_info(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -214,7 +666,11 @@ def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, p 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_assets_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'customer_id' is set @@ -260,10 +716,6 @@ def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, p header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -283,12 +735,105 @@ def get_customer_assets_using_get_with_http_info(self, customer_id, page_size, p _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_tenant_asset_using_get(self, asset_name, **kwargs): # noqa: E501 + """getTenantAsset # noqa: 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_asset_using_get(asset_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_name: assetName (required) + :return: Asset + 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_asset_using_get_with_http_info(asset_name, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_asset_using_get_with_http_info(asset_name, **kwargs) # noqa: E501 + return data + + def get_tenant_asset_using_get_with_http_info(self, asset_name, **kwargs): # noqa: E501 + """getTenantAsset # noqa: 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_asset_using_get_with_http_info(asset_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str asset_name: assetName (required) + :return: Asset + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['asset_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_tenant_asset_using_get" % key + ) + params[key] = val + del params['kwargs'] + # 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 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'asset_name' in params: + query_params.append(('assetName', params['asset_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenant/assets{?assetName}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Asset', # 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_assets_using_get(self, page_size, page, **kwargs): # noqa: E501 """getTenantAssets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_assets_using_get(page_size, page, async_req=True) + >>> thread = api.get_tenant_assets_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -314,7 +859,7 @@ def get_tenant_assets_using_get_with_http_info(self, page_size, page, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_assets_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_tenant_assets_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -337,7 +882,11 @@ def get_tenant_assets_using_get_with_http_info(self, page_size, page, **kwargs): 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_assets_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set @@ -377,10 +926,6 @@ def get_tenant_assets_using_get_with_http_info(self, page_size, page, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -405,7 +950,7 @@ def get_user_assets_using_get(self, page_size, page, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_assets_using_get(page_size, page, async_req=True) + >>> thread = api.get_user_assets_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -431,7 +976,7 @@ def get_user_assets_using_get_with_http_info(self, page_size, page, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_assets_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_user_assets_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -454,7 +999,11 @@ def get_user_assets_using_get_with_http_info(self, page_size, page, **kwargs): 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_assets_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set @@ -494,10 +1043,6 @@ def get_user_assets_using_get_with_http_info(self, page_size, page, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -517,16 +1062,16 @@ def get_user_assets_using_get_with_http_info(self, page_size, page, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_asset_using_post(self, asset, **kwargs): # noqa: E501 + def save_asset_using_post(self, body, **kwargs): # noqa: E501 """saveAsset # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_asset_using_post(asset, async_req=True) + >>> thread = api.save_asset_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Asset asset: asset (required) + :param Asset body: asset (required) :param str entity_group_id: entityGroupId :return: Asset If the method is called asynchronously, @@ -534,28 +1079,28 @@ def save_asset_using_post(self, asset, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_asset_using_post_with_http_info(asset, **kwargs) # noqa: E501 + return self.save_asset_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_asset_using_post_with_http_info(asset, **kwargs) # noqa: E501 + (data) = self.save_asset_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_asset_using_post_with_http_info(self, asset, **kwargs): # noqa: E501 + def save_asset_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveAsset # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_asset_using_post_with_http_info(asset, async_req=True) + >>> thread = api.save_asset_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Asset asset: asset (required) + :param Asset body: asset (required) :param str entity_group_id: entityGroupId :return: Asset If the method is called asynchronously, returns the request thread. """ - all_params = ['asset', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -563,13 +1108,17 @@ def save_asset_using_post_with_http_info(self, asset, **kwargs): # noqa: E501 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_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'asset' is set - if ('asset' not in params or - params['asset'] is None): - raise ValueError("Missing the required parameter `asset` when calling `save_asset_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_asset_using_post`") # noqa: E501 collection_formats = {} @@ -585,8 +1134,8 @@ def save_asset_using_post_with_http_info(self, asset, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'asset' in params: - body_params = params['asset'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 diff --git a/tb_rest_client/api/api_pe/billing_endpoint_controller_api.py b/tb_rest_client/api/api_pe/billing_endpoint_controller_api.py index caaa19f3..59f407f8 100644 --- a/tb_rest_client/api/api_pe/billing_endpoint_controller_api.py +++ b/tb_rest_client/api/api_pe/billing_endpoint_controller_api.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -33,43 +32,43 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def check_tenant_can_update_plan_using_post(self, can_update_plan_request, **kwargs): # noqa: E501 + def check_tenant_can_update_plan_using_post(self, body, **kwargs): # noqa: E501 """checkTenantCanUpdatePlan # 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_tenant_can_update_plan_using_post(can_update_plan_request, async_req=True) + >>> thread = api.check_tenant_can_update_plan_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str can_update_plan_request: canUpdatePlanRequest (required) + :param str body: canUpdatePlanRequest (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.check_tenant_can_update_plan_using_post_with_http_info(can_update_plan_request, **kwargs) # noqa: E501 + return self.check_tenant_can_update_plan_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.check_tenant_can_update_plan_using_post_with_http_info(can_update_plan_request, **kwargs) # noqa: E501 + (data) = self.check_tenant_can_update_plan_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def check_tenant_can_update_plan_using_post_with_http_info(self, can_update_plan_request, **kwargs): # noqa: E501 + def check_tenant_can_update_plan_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """checkTenantCanUpdatePlan # 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_tenant_can_update_plan_using_post_with_http_info(can_update_plan_request, async_req=True) + >>> thread = api.check_tenant_can_update_plan_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str can_update_plan_request: canUpdatePlanRequest (required) + :param str body: canUpdatePlanRequest (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['can_update_plan_request'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -84,10 +83,10 @@ def check_tenant_can_update_plan_using_post_with_http_info(self, can_update_plan ) params[key] = val del params['kwargs'] - # verify the required parameter 'can_update_plan_request' is set - if self.api_client.client_side_validation and ('can_update_plan_request' not in params or - params['can_update_plan_request'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `can_update_plan_request` when calling `check_tenant_can_update_plan_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `check_tenant_can_update_plan_using_post`") # noqa: E501 collection_formats = {} @@ -101,12 +100,8 @@ def check_tenant_can_update_plan_using_post_with_http_info(self, can_update_plan local_var_files = {} body_params = None - if 'can_update_plan_request' in params: - body_params = params['can_update_plan_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -130,43 +125,43 @@ def check_tenant_can_update_plan_using_post_with_http_info(self, can_update_plan _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def notify_tenant_plan_changed_using_post(self, tenant_plan_changed_request, **kwargs): # noqa: E501 + def notify_tenant_plan_changed_using_post(self, body, **kwargs): # noqa: E501 """notifyTenantPlanChanged # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.notify_tenant_plan_changed_using_post(tenant_plan_changed_request, async_req=True) + >>> thread = api.notify_tenant_plan_changed_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_plan_changed_request: tenantPlanChangedRequest (required) + :param str body: tenantPlanChangedRequest (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.notify_tenant_plan_changed_using_post_with_http_info(tenant_plan_changed_request, **kwargs) # noqa: E501 + return self.notify_tenant_plan_changed_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.notify_tenant_plan_changed_using_post_with_http_info(tenant_plan_changed_request, **kwargs) # noqa: E501 + (data) = self.notify_tenant_plan_changed_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def notify_tenant_plan_changed_using_post_with_http_info(self, tenant_plan_changed_request, **kwargs): # noqa: E501 + def notify_tenant_plan_changed_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """notifyTenantPlanChanged # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.notify_tenant_plan_changed_using_post_with_http_info(tenant_plan_changed_request, async_req=True) + >>> thread = api.notify_tenant_plan_changed_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_plan_changed_request: tenantPlanChangedRequest (required) + :param str body: tenantPlanChangedRequest (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['tenant_plan_changed_request'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -181,10 +176,10 @@ def notify_tenant_plan_changed_using_post_with_http_info(self, tenant_plan_chang ) params[key] = val del params['kwargs'] - # verify the required parameter 'tenant_plan_changed_request' is set - if self.api_client.client_side_validation and ('tenant_plan_changed_request' not in params or - params['tenant_plan_changed_request'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `tenant_plan_changed_request` when calling `notify_tenant_plan_changed_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `notify_tenant_plan_changed_using_post`") # noqa: E501 collection_formats = {} @@ -198,12 +193,8 @@ def notify_tenant_plan_changed_using_post_with_http_info(self, tenant_plan_chang local_var_files = {} body_params = None - if 'tenant_plan_changed_request' in params: - body_params = params['tenant_plan_changed_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -227,43 +218,43 @@ def notify_tenant_plan_changed_using_post_with_http_info(self, tenant_plan_chang _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def notify_tenant_state_changed_using_post(self, tenant_state_changed_request, **kwargs): # noqa: E501 + def notify_tenant_state_changed_using_post(self, body, **kwargs): # noqa: E501 """notifyTenantStateChanged # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.notify_tenant_state_changed_using_post(tenant_state_changed_request, async_req=True) + >>> thread = api.notify_tenant_state_changed_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_state_changed_request: tenantStateChangedRequest (required) + :param str body: tenantStateChangedRequest (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.notify_tenant_state_changed_using_post_with_http_info(tenant_state_changed_request, **kwargs) # noqa: E501 + return self.notify_tenant_state_changed_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.notify_tenant_state_changed_using_post_with_http_info(tenant_state_changed_request, **kwargs) # noqa: E501 + (data) = self.notify_tenant_state_changed_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def notify_tenant_state_changed_using_post_with_http_info(self, tenant_state_changed_request, **kwargs): # noqa: E501 + def notify_tenant_state_changed_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """notifyTenantStateChanged # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.notify_tenant_state_changed_using_post_with_http_info(tenant_state_changed_request, async_req=True) + >>> thread = api.notify_tenant_state_changed_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_state_changed_request: tenantStateChangedRequest (required) + :param str body: tenantStateChangedRequest (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['tenant_state_changed_request'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -278,10 +269,10 @@ def notify_tenant_state_changed_using_post_with_http_info(self, tenant_state_cha ) params[key] = val del params['kwargs'] - # verify the required parameter 'tenant_state_changed_request' is set - if self.api_client.client_side_validation and ('tenant_state_changed_request' not in params or - params['tenant_state_changed_request'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `tenant_state_changed_request` when calling `notify_tenant_state_changed_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `notify_tenant_state_changed_using_post`") # noqa: E501 collection_formats = {} @@ -295,12 +286,8 @@ def notify_tenant_state_changed_using_post_with_http_info(self, tenant_state_cha local_var_files = {} body_params = None - if 'tenant_state_changed_request' in params: - body_params = params['tenant_state_changed_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -324,43 +311,43 @@ def notify_tenant_state_changed_using_post_with_http_info(self, tenant_state_cha _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def send_account_activated_email_using_post(self, send_account_activated_email_request, **kwargs): # noqa: E501 + def send_account_activated_email_using_post(self, body, **kwargs): # noqa: E501 """sendAccountActivatedEmail # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_account_activated_email_using_post(send_account_activated_email_request, async_req=True) + >>> thread = api.send_account_activated_email_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str send_account_activated_email_request: sendAccountActivatedEmailRequest (required) + :param str body: sendAccountActivatedEmailRequest (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.send_account_activated_email_using_post_with_http_info(send_account_activated_email_request, **kwargs) # noqa: E501 + return self.send_account_activated_email_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.send_account_activated_email_using_post_with_http_info(send_account_activated_email_request, **kwargs) # noqa: E501 + (data) = self.send_account_activated_email_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def send_account_activated_email_using_post_with_http_info(self, send_account_activated_email_request, **kwargs): # noqa: E501 + def send_account_activated_email_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """sendAccountActivatedEmail # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_account_activated_email_using_post_with_http_info(send_account_activated_email_request, async_req=True) + >>> thread = api.send_account_activated_email_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str send_account_activated_email_request: sendAccountActivatedEmailRequest (required) + :param str body: sendAccountActivatedEmailRequest (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['send_account_activated_email_request'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -375,10 +362,10 @@ def send_account_activated_email_using_post_with_http_info(self, send_account_ac ) params[key] = val del params['kwargs'] - # verify the required parameter 'send_account_activated_email_request' is set - if self.api_client.client_side_validation and ('send_account_activated_email_request' not in params or - params['send_account_activated_email_request'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `send_account_activated_email_request` when calling `send_account_activated_email_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `send_account_activated_email_using_post`") # noqa: E501 collection_formats = {} @@ -392,12 +379,8 @@ def send_account_activated_email_using_post_with_http_info(self, send_account_ac local_var_files = {} body_params = None - if 'send_account_activated_email_request' in params: - body_params = params['send_account_activated_email_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -421,43 +404,43 @@ def send_account_activated_email_using_post_with_http_info(self, send_account_ac _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def send_activation_email_using_post(self, send_activation_email_request, **kwargs): # noqa: E501 + def send_activation_email_using_post(self, body, **kwargs): # noqa: E501 """sendActivationEmail # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_activation_email_using_post(send_activation_email_request, async_req=True) + >>> thread = api.send_activation_email_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str send_activation_email_request: sendActivationEmailRequest (required) + :param str body: sendActivationEmailRequest (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.send_activation_email_using_post_with_http_info(send_activation_email_request, **kwargs) # noqa: E501 + return self.send_activation_email_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.send_activation_email_using_post_with_http_info(send_activation_email_request, **kwargs) # noqa: E501 + (data) = self.send_activation_email_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def send_activation_email_using_post_with_http_info(self, send_activation_email_request, **kwargs): # noqa: E501 + def send_activation_email_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """sendActivationEmail # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_activation_email_using_post_with_http_info(send_activation_email_request, async_req=True) + >>> thread = api.send_activation_email_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str send_activation_email_request: sendActivationEmailRequest (required) + :param str body: sendActivationEmailRequest (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['send_activation_email_request'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -472,10 +455,10 @@ def send_activation_email_using_post_with_http_info(self, send_activation_email_ ) params[key] = val del params['kwargs'] - # verify the required parameter 'send_activation_email_request' is set - if self.api_client.client_side_validation and ('send_activation_email_request' not in params or - params['send_activation_email_request'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `send_activation_email_request` when calling `send_activation_email_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `send_activation_email_using_post`") # noqa: E501 collection_formats = {} @@ -489,12 +472,8 @@ def send_activation_email_using_post_with_http_info(self, send_activation_email_ local_var_files = {} body_params = None - if 'send_activation_email_request' in params: - body_params = params['send_activation_email_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -518,43 +497,43 @@ def send_activation_email_using_post_with_http_info(self, send_activation_email_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def send_password_was_reset_email_using_post(self, send_password_was_reset_email_request, **kwargs): # noqa: E501 + def send_password_was_reset_email_using_post(self, body, **kwargs): # noqa: E501 """sendPasswordWasResetEmail # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_password_was_reset_email_using_post(send_password_was_reset_email_request, async_req=True) + >>> thread = api.send_password_was_reset_email_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str send_password_was_reset_email_request: sendPassowordWasResetEmailRequest (required) + :param str body: sendPassowordWasResetEmailRequest (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.send_password_was_reset_email_using_post_with_http_info(send_password_was_reset_email_request, **kwargs) # noqa: E501 + return self.send_password_was_reset_email_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.send_password_was_reset_email_using_post_with_http_info(send_password_was_reset_email_request, **kwargs) # noqa: E501 + (data) = self.send_password_was_reset_email_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def send_password_was_reset_email_using_post_with_http_info(self, send_password_was_reset_email_request, **kwargs): # noqa: E501 + def send_password_was_reset_email_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """sendPasswordWasResetEmail # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_password_was_reset_email_using_post_with_http_info(send_password_was_reset_email_request, async_req=True) + >>> thread = api.send_password_was_reset_email_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str send_password_was_reset_email_request: sendPassowordWasResetEmailRequest (required) + :param str body: sendPassowordWasResetEmailRequest (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['send_password_was_reset_email_request'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -569,10 +548,10 @@ def send_password_was_reset_email_using_post_with_http_info(self, send_password_ ) params[key] = val del params['kwargs'] - # verify the required parameter 'send_password_was_reset_email_request' is set - if self.api_client.client_side_validation and ('send_password_was_reset_email_request' not in params or - params['send_password_was_reset_email_request'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `send_password_was_reset_email_request` when calling `send_password_was_reset_email_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `send_password_was_reset_email_using_post`") # noqa: E501 collection_formats = {} @@ -586,12 +565,8 @@ def send_password_was_reset_email_using_post_with_http_info(self, send_password_ local_var_files = {} body_params = None - if 'send_password_was_reset_email_request' in params: - body_params = params['send_password_was_reset_email_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -615,43 +590,43 @@ def send_password_was_reset_email_using_post_with_http_info(self, send_password_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def send_reset_password_email_using_post(self, send_reset_password_email_request, **kwargs): # noqa: E501 + def send_reset_password_email_using_post(self, body, **kwargs): # noqa: E501 """sendResetPasswordEmail # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_reset_password_email_using_post(send_reset_password_email_request, async_req=True) + >>> thread = api.send_reset_password_email_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str send_reset_password_email_request: sendResetPasswordEmailRequest (required) + :param str body: sendResetPasswordEmailRequest (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.send_reset_password_email_using_post_with_http_info(send_reset_password_email_request, **kwargs) # noqa: E501 + return self.send_reset_password_email_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.send_reset_password_email_using_post_with_http_info(send_reset_password_email_request, **kwargs) # noqa: E501 + (data) = self.send_reset_password_email_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def send_reset_password_email_using_post_with_http_info(self, send_reset_password_email_request, **kwargs): # noqa: E501 + def send_reset_password_email_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """sendResetPasswordEmail # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.send_reset_password_email_using_post_with_http_info(send_reset_password_email_request, async_req=True) + >>> thread = api.send_reset_password_email_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str send_reset_password_email_request: sendResetPasswordEmailRequest (required) + :param str body: sendResetPasswordEmailRequest (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['send_reset_password_email_request'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -666,10 +641,10 @@ def send_reset_password_email_using_post_with_http_info(self, send_reset_passwor ) params[key] = val del params['kwargs'] - # verify the required parameter 'send_reset_password_email_request' is set - if self.api_client.client_side_validation and ('send_reset_password_email_request' not in params or - params['send_reset_password_email_request'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `send_reset_password_email_request` when calling `send_reset_password_email_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `send_reset_password_email_using_post`") # noqa: E501 collection_formats = {} @@ -683,12 +658,8 @@ def send_reset_password_email_using_post_with_http_info(self, send_reset_passwor local_var_files = {} body_params = None - if 'send_reset_password_email_request' in params: - body_params = params['send_reset_password_email_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -778,10 +749,6 @@ def tenant_has_billing_read_using_get_with_http_info(self, **kwargs): # noqa: E header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -867,10 +834,6 @@ def tenant_has_billing_write_using_get_with_http_info(self, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -888,4 +851,4 @@ def tenant_has_billing_write_using_get_with_http_info(self, **kwargs): # noqa: _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/blob_entity_controller_api.py b/tb_rest_client/api/api_pe/blob_entity_controller_api.py index 0a6f0aad..41e1a7b6 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class BlobEntityControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def delete_blob_entity_using_delete(self, blob_entity_id, **kwargs): # noqa: E5 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_blob_entity_using_delete(blob_entity_id, async_req=True) + >>> thread = api.delete_blob_entity_using_delete(blob_entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +58,7 @@ def delete_blob_entity_using_delete_with_http_info(self, blob_entity_id, **kwarg This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_blob_entity_using_delete_with_http_info(blob_entity_id, async_req=True) + >>> thread = api.delete_blob_entity_using_delete_with_http_info(blob_entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,7 +76,11 @@ def delete_blob_entity_using_delete_with_http_info(self, blob_entity_id, **kwarg 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_blob_entity_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'blob_entity_id' is set @@ -100,14 +102,6 @@ def delete_blob_entity_using_delete_with_http_info(self, blob_entity_id, **kwarg local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -132,7 +126,7 @@ def download_blob_entity_using_get(self, blob_entity_id, **kwargs): # noqa: E50 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.download_blob_entity_using_get(blob_entity_id, async_req=True) + >>> thread = api.download_blob_entity_using_get(blob_entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -153,7 +147,7 @@ def download_blob_entity_using_get_with_http_info(self, blob_entity_id, **kwargs This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.download_blob_entity_using_get_with_http_info(blob_entity_id, async_req=True) + >>> thread = api.download_blob_entity_using_get_with_http_info(blob_entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -171,7 +165,11 @@ def download_blob_entity_using_get_with_http_info(self, blob_entity_id, **kwargs 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 download_blob_entity_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'blob_entity_id' is set @@ -197,10 +195,6 @@ def download_blob_entity_using_get_with_http_info(self, blob_entity_id, **kwargs header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -225,7 +219,7 @@ def get_blob_entities_by_ids_using_get(self, blob_entity_ids, **kwargs): # noqa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_blob_entities_by_ids_using_get(blob_entity_ids, async_req=True) + >>> thread = api.get_blob_entities_by_ids_using_get(blob_entity_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -246,7 +240,7 @@ def get_blob_entities_by_ids_using_get_with_http_info(self, blob_entity_ids, **k This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_blob_entities_by_ids_using_get_with_http_info(blob_entity_ids, async_req=True) + >>> thread = api.get_blob_entities_by_ids_using_get_with_http_info(blob_entity_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -264,7 +258,11 @@ def get_blob_entities_by_ids_using_get_with_http_info(self, blob_entity_ids, **k 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_blob_entities_by_ids_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'blob_entity_ids' is set @@ -290,10 +288,6 @@ def get_blob_entities_by_ids_using_get_with_http_info(self, blob_entity_ids, **k header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -318,7 +312,7 @@ def get_blob_entities_using_get(self, page_size, page, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_blob_entities_using_get(page_size, page, async_req=True) + >>> thread = api.get_blob_entities_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -346,7 +340,7 @@ def get_blob_entities_using_get_with_http_info(self, page_size, page, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_blob_entities_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_blob_entities_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -371,7 +365,11 @@ def get_blob_entities_using_get_with_http_info(self, page_size, page, **kwargs): 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_blob_entities_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set @@ -415,10 +413,6 @@ def get_blob_entities_using_get_with_http_info(self, page_size, page, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -443,7 +437,7 @@ def get_blob_entity_info_by_id_using_get(self, blob_entity_id, **kwargs): # noq This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_blob_entity_info_by_id_using_get(blob_entity_id, async_req=True) + >>> thread = api.get_blob_entity_info_by_id_using_get(blob_entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -464,7 +458,7 @@ def get_blob_entity_info_by_id_using_get_with_http_info(self, blob_entity_id, ** This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_blob_entity_info_by_id_using_get_with_http_info(blob_entity_id, async_req=True) + >>> thread = api.get_blob_entity_info_by_id_using_get_with_http_info(blob_entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -482,7 +476,11 @@ def get_blob_entity_info_by_id_using_get_with_http_info(self, blob_entity_id, ** 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_blob_entity_info_by_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'blob_entity_id' is set @@ -508,10 +506,6 @@ def get_blob_entity_info_by_id_using_get_with_http_info(self, blob_entity_id, ** header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/chirp_stack_integration_controller_api.py b/tb_rest_client/api/api_pe/chirp_stack_integration_controller_api.py index 0b55ac37..9be8639e 100644 --- a/tb_rest_client/api/api_pe/chirp_stack_integration_controller_api.py +++ b/tb_rest_client/api/api_pe/chirp_stack_integration_controller_api.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -33,47 +32,47 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def process_request_using_delete(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_delete(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_delete(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_delete(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_delete_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_delete_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_delete_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_delete_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_delete_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_delete_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_delete_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_delete_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -88,18 +87,18 @@ def process_request_using_delete_with_http_info(self, routing_key, msg, request_ ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_delete`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_delete`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_delete`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_delete`") # 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 `process_request_using_delete`") # noqa: E501 collection_formats = {} @@ -117,8 +116,8 @@ def process_request_using_delete_with_http_info(self, routing_key, msg, request_ local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -146,47 +145,47 @@ def process_request_using_delete_with_http_info(self, routing_key, msg, request_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_get(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_get(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_get(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_get(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_get_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_get_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_get_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_get_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_get_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_get_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_get_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_get_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -201,18 +200,18 @@ def process_request_using_get_with_http_info(self, routing_key, msg, request_hea ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_get`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_get`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_get`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_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 `process_request_using_get`") # noqa: E501 collection_formats = {} @@ -230,8 +229,8 @@ def process_request_using_get_with_http_info(self, routing_key, msg, request_hea local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -259,47 +258,47 @@ def process_request_using_get_with_http_info(self, routing_key, msg, request_hea _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_head(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_head(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_head(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_head(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_head_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_head_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_head_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_head_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_head_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_head_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_head_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_head_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -314,18 +313,18 @@ def process_request_using_head_with_http_info(self, routing_key, msg, request_he ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_head`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_head`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_head`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_head`") # 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 `process_request_using_head`") # noqa: E501 collection_formats = {} @@ -343,8 +342,8 @@ def process_request_using_head_with_http_info(self, routing_key, msg, request_he local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -372,47 +371,47 @@ def process_request_using_head_with_http_info(self, routing_key, msg, request_he _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_options(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_options(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_options(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_options(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_options_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_options_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_options_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_options_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_options_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_options_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_options_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_options_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -427,18 +426,18 @@ def process_request_using_options_with_http_info(self, routing_key, msg, request ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_options`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_options`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_options`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_options`") # 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 `process_request_using_options`") # noqa: E501 collection_formats = {} @@ -456,8 +455,8 @@ def process_request_using_options_with_http_info(self, routing_key, msg, request local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -485,47 +484,47 @@ def process_request_using_options_with_http_info(self, routing_key, msg, request _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_patch(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_patch(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_patch(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_patch(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_patch_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_patch_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_patch_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_patch_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_patch_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_patch_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_patch_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_patch_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -540,18 +539,18 @@ def process_request_using_patch_with_http_info(self, routing_key, msg, request_h ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_patch`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_patch`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_patch`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_patch`") # 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 `process_request_using_patch`") # noqa: E501 collection_formats = {} @@ -569,8 +568,8 @@ def process_request_using_patch_with_http_info(self, routing_key, msg, request_h local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -598,47 +597,47 @@ def process_request_using_patch_with_http_info(self, routing_key, msg, request_h _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_post(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_post(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_post(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_post(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_post_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_post_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_post_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_post_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_post_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_post_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_post_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_post_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -653,18 +652,18 @@ def process_request_using_post_with_http_info(self, routing_key, msg, request_he ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_post`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_post`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post`") # 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 `process_request_using_post`") # noqa: E501 collection_formats = {} @@ -682,8 +681,8 @@ def process_request_using_post_with_http_info(self, routing_key, msg, request_he local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -711,47 +710,47 @@ def process_request_using_post_with_http_info(self, routing_key, msg, request_he _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_put(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_put(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_put(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_put(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_put_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_put_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_put_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_put_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_put_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_put_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_put_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_put_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -766,18 +765,18 @@ def process_request_using_put_with_http_info(self, routing_key, msg, request_hea ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_put`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_put`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_put`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_put`") # 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 `process_request_using_put`") # noqa: E501 collection_formats = {} @@ -795,8 +794,8 @@ def process_request_using_put_with_http_info(self, routing_key, msg, request_hea local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -822,4 +821,4 @@ def process_request_using_put_with_http_info(self, routing_key, msg, request_hea _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/cloud_endpoint_controller_api.py b/tb_rest_client/api/api_pe/cloud_endpoint_controller_api.py index 67236922..e9b12181 100644 --- a/tb_rest_client/api/api_pe/cloud_endpoint_controller_api.py +++ b/tb_rest_client/api/api_pe/cloud_endpoint_controller_api.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -99,10 +98,6 @@ def tenant_has_white_label_read_using_get_with_http_info(self, **kwargs): # noq header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -188,10 +183,6 @@ def tenant_has_white_label_write_using_get_with_http_info(self, **kwargs): # no header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -273,14 +264,6 @@ def tenant_white_labeling_allowed_using_get_with_http_info(self, **kwargs): # n local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -298,4 +281,4 @@ def tenant_white_labeling_allowed_using_get_with_http_info(self, **kwargs): # n _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/converter_controller_api.py b/tb_rest_client/api/api_pe/converter_controller_api.py index fe189f1e..c28cb95d 100644 --- a/tb_rest_client/api/api_pe/converter_controller_api.py +++ b/tb_rest_client/api/api_pe/converter_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class ConverterControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def delete_converter_using_delete(self, converter_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_converter_using_delete(converter_id, async_req=True) + >>> thread = api.delete_converter_using_delete(converter_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +58,7 @@ def delete_converter_using_delete_with_http_info(self, converter_id, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_converter_using_delete_with_http_info(converter_id, async_req=True) + >>> thread = api.delete_converter_using_delete_with_http_info(converter_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,7 +76,11 @@ def delete_converter_using_delete_with_http_info(self, converter_id, **kwargs): 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_converter_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'converter_id' is set @@ -100,14 +102,6 @@ def delete_converter_using_delete_with_http_info(self, converter_id, **kwargs): local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -132,7 +126,7 @@ def get_converter_by_id_using_get(self, converter_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_converter_by_id_using_get(converter_id, async_req=True) + >>> thread = api.get_converter_by_id_using_get(converter_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -153,7 +147,7 @@ def get_converter_by_id_using_get_with_http_info(self, converter_id, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_converter_by_id_using_get_with_http_info(converter_id, async_req=True) + >>> thread = api.get_converter_by_id_using_get_with_http_info(converter_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -171,7 +165,11 @@ def get_converter_by_id_using_get_with_http_info(self, converter_id, **kwargs): 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_converter_by_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'converter_id' is set @@ -197,10 +195,6 @@ def get_converter_by_id_using_get_with_http_info(self, converter_id, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -225,7 +219,7 @@ def get_converters_by_ids_using_get(self, converter_ids, **kwargs): # noqa: E50 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_converters_by_ids_using_get(converter_ids, async_req=True) + >>> thread = api.get_converters_by_ids_using_get(converter_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -246,7 +240,7 @@ def get_converters_by_ids_using_get_with_http_info(self, converter_ids, **kwargs This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_converters_by_ids_using_get_with_http_info(converter_ids, async_req=True) + >>> thread = api.get_converters_by_ids_using_get_with_http_info(converter_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -264,7 +258,11 @@ def get_converters_by_ids_using_get_with_http_info(self, converter_ids, **kwargs 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_converters_by_ids_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'converter_ids' is set @@ -290,10 +288,6 @@ def get_converters_by_ids_using_get_with_http_info(self, converter_ids, **kwargs header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -318,7 +312,7 @@ def get_converters_using_get(self, page_size, page, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_converters_using_get(page_size, page, async_req=True) + >>> thread = api.get_converters_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -343,7 +337,7 @@ def get_converters_using_get_with_http_info(self, page_size, page, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_converters_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_converters_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -365,7 +359,11 @@ def get_converters_using_get_with_http_info(self, page_size, page, **kwargs): # 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_converters_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set @@ -403,10 +401,6 @@ def get_converters_using_get_with_http_info(self, page_size, page, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -431,7 +425,7 @@ def get_latest_converter_debug_input_using_get(self, converter_id, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_latest_converter_debug_input_using_get(converter_id, async_req=True) + >>> thread = api.get_latest_converter_debug_input_using_get(converter_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -452,7 +446,7 @@ def get_latest_converter_debug_input_using_get_with_http_info(self, converter_id This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_latest_converter_debug_input_using_get_with_http_info(converter_id, async_req=True) + >>> thread = api.get_latest_converter_debug_input_using_get_with_http_info(converter_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -470,7 +464,11 @@ def get_latest_converter_debug_input_using_get_with_http_info(self, converter_id 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_latest_converter_debug_input_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'converter_id' is set @@ -496,10 +494,6 @@ def get_latest_converter_debug_input_using_get_with_http_info(self, converter_id header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -519,43 +513,43 @@ def get_latest_converter_debug_input_using_get_with_http_info(self, converter_id _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_converter_using_post(self, converter, **kwargs): # noqa: E501 + def save_converter_using_post(self, body, **kwargs): # noqa: E501 """saveConverter # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_converter_using_post(converter, async_req=True) + >>> thread = api.save_converter_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Converter converter: converter (required) + :param Converter body: converter (required) :return: Converter If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_converter_using_post_with_http_info(converter, **kwargs) # noqa: E501 + return self.save_converter_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_converter_using_post_with_http_info(converter, **kwargs) # noqa: E501 + (data) = self.save_converter_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_converter_using_post_with_http_info(self, converter, **kwargs): # noqa: E501 + def save_converter_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveConverter # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_converter_using_post_with_http_info(converter, async_req=True) + >>> thread = api.save_converter_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Converter converter: converter (required) + :param Converter body: converter (required) :return: Converter If the method is called asynchronously, returns the request thread. """ - all_params = ['converter'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -563,13 +557,17 @@ def save_converter_using_post_with_http_info(self, converter, **kwargs): # noqa 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_converter_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'converter' is set - if ('converter' not in params or - params['converter'] is None): - raise ValueError("Missing the required parameter `converter` when calling `save_converter_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_converter_using_post`") # noqa: E501 collection_formats = {} @@ -583,8 +581,8 @@ def save_converter_using_post_with_http_info(self, converter, **kwargs): # noqa local_var_files = {} body_params = None - if 'converter' in params: - body_params = params['converter'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -612,43 +610,43 @@ def save_converter_using_post_with_http_info(self, converter, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def test_down_link_converter_using_post(self, input_params, **kwargs): # noqa: E501 + def test_down_link_converter_using_post(self, body, **kwargs): # noqa: E501 """testDownLinkConverter # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.test_down_link_converter_using_post(input_params, async_req=True) + >>> thread = api.test_down_link_converter_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str input_params: inputParams (required) + :param str body: inputParams (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.test_down_link_converter_using_post_with_http_info(input_params, **kwargs) # noqa: E501 + return self.test_down_link_converter_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.test_down_link_converter_using_post_with_http_info(input_params, **kwargs) # noqa: E501 + (data) = self.test_down_link_converter_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def test_down_link_converter_using_post_with_http_info(self, input_params, **kwargs): # noqa: E501 + def test_down_link_converter_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """testDownLinkConverter # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.test_down_link_converter_using_post_with_http_info(input_params, async_req=True) + >>> thread = api.test_down_link_converter_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str input_params: inputParams (required) + :param str body: inputParams (required) :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['input_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') @@ -656,13 +654,17 @@ def test_down_link_converter_using_post_with_http_info(self, input_params, **kwa 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 test_down_link_converter_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'input_params' is set - if ('input_params' not in params or - params['input_params'] is None): - raise ValueError("Missing the required parameter `input_params` when calling `test_down_link_converter_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `test_down_link_converter_using_post`") # noqa: E501 collection_formats = {} @@ -676,8 +678,8 @@ def test_down_link_converter_using_post_with_http_info(self, input_params, **kwa local_var_files = {} body_params = None - if 'input_params' in params: - body_params = params['input_params'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -705,43 +707,43 @@ def test_down_link_converter_using_post_with_http_info(self, input_params, **kwa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def test_up_link_converter_using_post(self, input_params, **kwargs): # noqa: E501 + def test_up_link_converter_using_post(self, body, **kwargs): # noqa: E501 """testUpLinkConverter # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.test_up_link_converter_using_post(input_params, async_req=True) + >>> thread = api.test_up_link_converter_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str input_params: inputParams (required) + :param str body: inputParams (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.test_up_link_converter_using_post_with_http_info(input_params, **kwargs) # noqa: E501 + return self.test_up_link_converter_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.test_up_link_converter_using_post_with_http_info(input_params, **kwargs) # noqa: E501 + (data) = self.test_up_link_converter_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def test_up_link_converter_using_post_with_http_info(self, input_params, **kwargs): # noqa: E501 + def test_up_link_converter_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """testUpLinkConverter # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.test_up_link_converter_using_post_with_http_info(input_params, async_req=True) + >>> thread = api.test_up_link_converter_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str input_params: inputParams (required) + :param str body: inputParams (required) :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['input_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') @@ -749,13 +751,17 @@ def test_up_link_converter_using_post_with_http_info(self, input_params, **kwarg 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 test_up_link_converter_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'input_params' is set - if ('input_params' not in params or - params['input_params'] is None): - raise ValueError("Missing the required parameter `input_params` when calling `test_up_link_converter_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `test_up_link_converter_using_post`") # noqa: E501 collection_formats = {} @@ -769,8 +775,8 @@ def test_up_link_converter_using_post_with_http_info(self, input_params, **kwarg local_var_files = {} body_params = None - if 'input_params' in params: - body_params = params['input_params'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 06f36caa..dd9bfa1a 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class CustomMenuControllerApi(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 """ @@ -39,7 +37,7 @@ def get_current_custom_menu_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_current_custom_menu_using_get(async_req=True) + >>> thread = api.get_current_custom_menu_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -59,7 +57,7 @@ def get_current_custom_menu_using_get_with_http_info(self, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_current_custom_menu_using_get_with_http_info(async_req=True) + >>> thread = api.get_current_custom_menu_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -76,7 +74,11 @@ def get_current_custom_menu_using_get_with_http_info(self, **kwargs): # noqa: E 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_current_custom_menu_using_get" % key + ) params[key] = val del params['kwargs'] @@ -96,10 +98,6 @@ def get_current_custom_menu_using_get_with_http_info(self, **kwargs): # noqa: E 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 @@ -124,7 +122,7 @@ def get_custom_menu_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_custom_menu_using_get(async_req=True) + >>> thread = api.get_custom_menu_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -144,7 +142,7 @@ def get_custom_menu_using_get_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_custom_menu_using_get_with_http_info(async_req=True) + >>> thread = api.get_custom_menu_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -161,7 +159,11 @@ def get_custom_menu_using_get_with_http_info(self, **kwargs): # noqa: E501 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_custom_menu_using_get" % key + ) params[key] = val del params['kwargs'] @@ -181,10 +183,6 @@ def get_custom_menu_using_get_with_http_info(self, **kwargs): # noqa: E501 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 @@ -209,11 +207,11 @@ def save_custom_menu_using_post(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_custom_menu_using_post(async_req=True) + >>> thread = api.save_custom_menu_using_post(async_req=True) >>> result = thread.get() :param async_req bool - :param CustomMenu custom_menu: customMenu + :param CustomMenu body: customMenu :return: CustomMenu If the method is called asynchronously, returns the request thread. @@ -230,17 +228,17 @@ def save_custom_menu_using_post_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_custom_menu_using_post_with_http_info(async_req=True) + >>> thread = api.save_custom_menu_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param CustomMenu custom_menu: customMenu + :param CustomMenu body: customMenu :return: CustomMenu If the method is called asynchronously, returns the request thread. """ - all_params = ['custom_menu'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -248,7 +246,11 @@ def save_custom_menu_using_post_with_http_info(self, **kwargs): # noqa: E501 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_custom_menu_using_post" % key + ) params[key] = val del params['kwargs'] @@ -264,8 +266,8 @@ def save_custom_menu_using_post_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'custom_menu' in params: - body_params = params['custom_menu'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 296f2ab1..c722e975 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class CustomTranslationControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def get_current_custom_translation_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_current_custom_translation_using_get(async_req=True) + >>> thread = api.get_current_custom_translation_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -59,7 +57,7 @@ def get_current_custom_translation_using_get_with_http_info(self, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_current_custom_translation_using_get_with_http_info(async_req=True) + >>> thread = api.get_current_custom_translation_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -76,7 +74,11 @@ def get_current_custom_translation_using_get_with_http_info(self, **kwargs): # 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_current_custom_translation_using_get" % key + ) params[key] = val del params['kwargs'] @@ -96,10 +98,6 @@ def get_current_custom_translation_using_get_with_http_info(self, **kwargs): # 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 @@ -124,7 +122,7 @@ def get_custom_translation_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_custom_translation_using_get(async_req=True) + >>> thread = api.get_custom_translation_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -144,7 +142,7 @@ def get_custom_translation_using_get_with_http_info(self, **kwargs): # noqa: E5 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_custom_translation_using_get_with_http_info(async_req=True) + >>> thread = api.get_custom_translation_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -161,7 +159,11 @@ def get_custom_translation_using_get_with_http_info(self, **kwargs): # noqa: E5 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_custom_translation_using_get" % key + ) params[key] = val del params['kwargs'] @@ -181,10 +183,6 @@ def get_custom_translation_using_get_with_http_info(self, **kwargs): # noqa: E5 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 @@ -204,43 +202,43 @@ def get_custom_translation_using_get_with_http_info(self, **kwargs): # noqa: E5 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_custom_translation_using_post(self, custom_translation, **kwargs): # noqa: E501 + def save_custom_translation_using_post(self, body, **kwargs): # noqa: E501 """saveCustomTranslation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_custom_translation_using_post(custom_translation, async_req=True) + >>> thread = api.save_custom_translation_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param CustomTranslation custom_translation: customTranslation (required) + :param CustomTranslation body: customTranslation (required) :return: CustomTranslation If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_custom_translation_using_post_with_http_info(custom_translation, **kwargs) # noqa: E501 + return self.save_custom_translation_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_custom_translation_using_post_with_http_info(custom_translation, **kwargs) # noqa: E501 + (data) = self.save_custom_translation_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_custom_translation_using_post_with_http_info(self, custom_translation, **kwargs): # noqa: E501 + def save_custom_translation_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveCustomTranslation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_custom_translation_using_post_with_http_info(custom_translation, async_req=True) + >>> thread = api.save_custom_translation_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param CustomTranslation custom_translation: customTranslation (required) + :param CustomTranslation body: customTranslation (required) :return: CustomTranslation If the method is called asynchronously, returns the request thread. """ - all_params = ['custom_translation'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -248,13 +246,17 @@ def save_custom_translation_using_post_with_http_info(self, custom_translation, 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_custom_translation_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'custom_translation' is set - if ('custom_translation' not in params or - params['custom_translation'] is None): - raise ValueError("Missing the required parameter `custom_translation` when calling `save_custom_translation_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_custom_translation_using_post`") # noqa: E501 collection_formats = {} @@ -268,8 +270,8 @@ def save_custom_translation_using_post_with_http_info(self, custom_translation, local_var_files = {} body_params = None - if 'custom_translation' in params: - body_params = params['custom_translation'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 82e0d490..fb92ad5b 100644 --- a/tb_rest_client/api/api_pe/customer_controller_api.py +++ b/tb_rest_client/api/api_pe/customer_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -21,23 +17,302 @@ # python 2 and python 3 compatibility library import six -from tb_rest_client.api.api_ce import CustomerControllerApi +from tb_rest_client.api_client import ApiClient -class CustomerControllerApi(CustomerControllerApi): +class CustomerControllerApi(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): - super(CustomerControllerApi, self).__init__(api_client=api_client) + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_customer_using_delete(self, customer_id, **kwargs): # noqa: E501 + """deleteCustomer # 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_customer_using_delete(customer_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: customerId (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_customer_using_delete_with_http_info(customer_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_customer_using_delete_with_http_info(customer_id, **kwargs) # noqa: E501 + return data + + def delete_customer_using_delete_with_http_info(self, customer_id, **kwargs): # noqa: E501 + """deleteCustomer # 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_customer_using_delete_with_http_info(customer_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: customerId (required) + :return: None + 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 delete_customer_using_delete" % 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 `delete_customer_using_delete`") # 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 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}', '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_customer_by_id_using_get(self, customer_id, **kwargs): # noqa: E501 + """getCustomerById # noqa: 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_by_id_using_get(customer_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: customerId (required) + :return: Customer + 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_by_id_using_get_with_http_info(customer_id, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_by_id_using_get_with_http_info(customer_id, **kwargs) # noqa: E501 + return data + + def get_customer_by_id_using_get_with_http_info(self, customer_id, **kwargs): # noqa: E501 + """getCustomerById # noqa: 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_by_id_using_get_with_http_info(customer_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: customerId (required) + :return: Customer + 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_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_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Customer', # 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 + """getCustomerTitleById # noqa: 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) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: customerId (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_title_by_id_using_get_with_http_info(customer_id, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_title_by_id_using_get_with_http_info(customer_id, **kwargs) # noqa: E501 + return data + + def get_customer_title_by_id_using_get_with_http_info(self, customer_id, **kwargs): # noqa: E501 + """getCustomerTitleById # noqa: 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) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: customerId (required) + :return: str + 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_title_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_title_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/text']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}/title', '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 get_customers_by_entity_group_id_using_get(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 """getCustomersByEntityGroupId # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customers_by_entity_group_id_using_get(entity_group_id, page_size, page, async_req=True) + >>> thread = api.get_customers_by_entity_group_id_using_get(entity_group_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -63,7 +338,7 @@ def get_customers_by_entity_group_id_using_get_with_http_info(self, entity_group This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customers_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, async_req=True) + >>> thread = api.get_customers_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 @@ -86,7 +361,11 @@ def get_customers_by_entity_group_id_using_get_with_http_info(self, entity_group 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_customers_by_entity_group_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_group_id' is set @@ -102,10 +381,6 @@ def get_customers_by_entity_group_id_using_get_with_http_info(self, entity_group params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_customers_by_entity_group_id_using_get`") # noqa: E501 - if 'page_size' in params and params['page_size'] < 1.0: # noqa: E501 - raise ValueError("Invalid value for parameter `page_size` when calling `get_customers_by_entity_group_id_using_get`, must be a value greater than or equal to `1.0`") # noqa: E501 - if 'page' in params and params['page'] < 0.0: # noqa: E501 - raise ValueError("Invalid value for parameter `page` when calling `get_customers_by_entity_group_id_using_get`, must be a value greater than or equal to `0.0`") # noqa: E501 collection_formats = {} path_params = {} @@ -134,10 +409,6 @@ def get_customers_by_entity_group_id_using_get_with_http_info(self, entity_group header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -162,7 +433,7 @@ def get_customers_by_ids_using_get(self, customer_ids, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customers_by_ids_using_get(customer_ids, async_req=True) + >>> thread = api.get_customers_by_ids_using_get(customer_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -183,7 +454,7 @@ def get_customers_by_ids_using_get_with_http_info(self, customer_ids, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customers_by_ids_using_get_with_http_info(customer_ids, async_req=True) + >>> thread = api.get_customers_by_ids_using_get_with_http_info(customer_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -201,7 +472,11 @@ def get_customers_by_ids_using_get_with_http_info(self, customer_ids, **kwargs): 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_customers_by_ids_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'customer_ids' is set @@ -227,10 +502,6 @@ def get_customers_by_ids_using_get_with_http_info(self, customer_ids, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -255,7 +526,7 @@ def get_customers_using_get(self, page_size, page, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customers_using_get(page_size, page, async_req=True) + >>> thread = api.get_customers_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -280,7 +551,7 @@ def get_customers_using_get_with_http_info(self, page_size, page, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customers_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_customers_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -302,7 +573,11 @@ def get_customers_using_get_with_http_info(self, page_size, page, **kwargs): # 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_customers_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set @@ -340,10 +615,6 @@ def get_customers_using_get_with_http_info(self, page_size, page, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -363,12 +634,198 @@ def get_customers_using_get_with_http_info(self, page_size, page, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_short_customer_info_by_id_using_get(self, customer_id, **kwargs): # noqa: E501 + """getShortCustomerInfoById # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_short_customer_info_by_id_using_get(customer_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: customerId (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_short_customer_info_by_id_using_get_with_http_info(customer_id, **kwargs) # noqa: E501 + else: + (data) = self.get_short_customer_info_by_id_using_get_with_http_info(customer_id, **kwargs) # noqa: E501 + return data + + def get_short_customer_info_by_id_using_get_with_http_info(self, customer_id, **kwargs): # noqa: E501 + """getShortCustomerInfoById # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_short_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: customerId (required) + :return: str + 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_short_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_short_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}/shortInfo', '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 get_tenant_customer_using_get(self, customer_title, **kwargs): # noqa: E501 + """getTenantCustomer # noqa: 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_customer_using_get(customer_title, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_title: customerTitle (required) + :return: Customer + 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_customer_using_get_with_http_info(customer_title, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_customer_using_get_with_http_info(customer_title, **kwargs) # noqa: E501 + return data + + def get_tenant_customer_using_get_with_http_info(self, customer_title, **kwargs): # noqa: E501 + """getTenantCustomer # noqa: 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_customer_using_get_with_http_info(customer_title, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_title: customerTitle (required) + :return: Customer + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['customer_title'] # 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_customer_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'customer_title' is set + if ('customer_title' not in params or + params['customer_title'] is None): + raise ValueError("Missing the required parameter `customer_title` when calling `get_tenant_customer_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'customer_title' in params: + query_params.append(('customerTitle', params['customer_title'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenant/customers{?customerTitle}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Customer', # 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_customers_using_get(self, page_size, page, **kwargs): # noqa: E501 """getUserCustomers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_customers_using_get(page_size, page, async_req=True) + >>> thread = api.get_user_customers_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -393,7 +850,7 @@ def get_user_customers_using_get_with_http_info(self, page_size, page, **kwargs) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_customers_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_user_customers_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -415,7 +872,11 @@ def get_user_customers_using_get_with_http_info(self, page_size, page, **kwargs) 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_customers_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set @@ -453,10 +914,6 @@ def get_user_customers_using_get_with_http_info(self, page_size, page, **kwargs) header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -476,16 +933,16 @@ def get_user_customers_using_get_with_http_info(self, page_size, page, **kwargs) _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_customer_using_post(self, customer, **kwargs): # noqa: E501 + def save_customer_using_post(self, body, **kwargs): # noqa: E501 """saveCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_customer_using_post(customer, async_req=True) + >>> thread = api.save_customer_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Customer customer: customer (required) + :param Customer body: customer (required) :param str entity_group_id: entityGroupId :return: Customer If the method is called asynchronously, @@ -493,28 +950,28 @@ def save_customer_using_post(self, customer, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_customer_using_post_with_http_info(customer, **kwargs) # noqa: E501 + return self.save_customer_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_customer_using_post_with_http_info(customer, **kwargs) # noqa: E501 + (data) = self.save_customer_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_customer_using_post_with_http_info(self, customer, **kwargs): # noqa: E501 + def save_customer_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveCustomer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_customer_using_post_with_http_info(customer, async_req=True) + >>> thread = api.save_customer_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Customer customer: customer (required) + :param Customer body: customer (required) :param str entity_group_id: entityGroupId :return: Customer If the method is called asynchronously, returns the request thread. """ - all_params = ['customer', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -522,13 +979,17 @@ def save_customer_using_post_with_http_info(self, customer, **kwargs): # noqa: 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_customer_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'customer' is set - if ('customer' not in params or - params['customer'] is None): - raise ValueError("Missing the required parameter `customer` when calling `save_customer_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_customer_using_post`") # noqa: E501 collection_formats = {} @@ -544,8 +1005,8 @@ def save_customer_using_post_with_http_info(self, customer, **kwargs): # noqa: local_var_files = {} body_params = None - if 'customer' in params: - body_params = params['customer'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 b3b531c3..7cf4a80d 100644 --- a/tb_rest_client/api/api_pe/dashboard_controller_api.py +++ b/tb_rest_client/api/api_pe/dashboard_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -21,64 +17,149 @@ # python 2 and python 3 compatibility library import six -from tb_rest_client.api.api_ce import DashboardControllerApi +from tb_rest_client.api_client import ApiClient + +class DashboardControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. -class DashboardControllerApi(DashboardControllerApi): - """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): - super().__init__(api_client) + if api_client is None: + api_client = ApiClient() + self.api_client = api_client - def get_dashboards_by_entity_group_id_using_get(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 - """getDashboardsByEntityGroupId # noqa: E501 + def delete_dashboard_using_delete(self, dashboard_id, **kwargs): # noqa: E501 + """deleteDashboard # 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_dashboard_using_delete(dashboard_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str dashboard_id: dashboardId (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_dashboard_using_delete_with_http_info(dashboard_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_dashboard_using_delete_with_http_info(dashboard_id, **kwargs) # noqa: E501 + return data + + def delete_dashboard_using_delete_with_http_info(self, dashboard_id, **kwargs): # noqa: E501 + """deleteDashboard # 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_dashboard_using_delete_with_http_info(dashboard_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str dashboard_id: dashboardId (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['dashboard_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_dashboard_using_delete" % 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 `delete_dashboard_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'dashboard_id' in params: + path_params['dashboardId'] = params['dashboard_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/dashboard/{dashboardId}', '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 export_group_dashboards_using_get(self, entity_group_id, limit, **kwargs): # noqa: E501 + """exportGroupDashboards # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_dashboards_by_entity_group_id_using_get(entity_group_id, page_size, page, async_req=True) + >>> thread = api.export_group_dashboards_using_get(entity_group_id, limit, async_req=True) >>> result = thread.get() :param async_req bool :param str entity_group_id: entityGroupId (required) - :param int page_size: Page size (required) - :param int page: Page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataDashboardInfo + :param str limit: limit (required) + :return: list[Dashboard] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_dashboards_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + return self.export_group_dashboards_using_get_with_http_info(entity_group_id, limit, **kwargs) # noqa: E501 else: - (data) = self.get_dashboards_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + (data) = self.export_group_dashboards_using_get_with_http_info(entity_group_id, limit, **kwargs) # noqa: E501 return data - def get_dashboards_by_entity_group_id_using_get_with_http_info(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 - """getDashboardsByEntityGroupId # noqa: E501 + def export_group_dashboards_using_get_with_http_info(self, entity_group_id, limit, **kwargs): # noqa: E501 + """exportGroupDashboards # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_dashboards_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, async_req=True) + >>> thread = api.export_group_dashboards_using_get_with_http_info(entity_group_id, limit, async_req=True) >>> result = thread.get() :param async_req bool :param str entity_group_id: entityGroupId (required) - :param int page_size: Page size (required) - :param int page: Page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataDashboardInfo + :param str limit: limit (required) + :return: list[Dashboard] 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 = ['entity_group_id', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -86,43 +167,1215 @@ def get_dashboards_by_entity_group_id_using_get_with_http_info(self, entity_grou 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 export_group_dashboards_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_dashboards_by_entity_group_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_group_id` when calling `export_group_dashboards_using_get`") # noqa: E501 + # verify the required parameter 'limit' is set + if ('limit' not in params or + params['limit'] is None): + raise ValueError("Missing the required parameter `limit` when calling `export_group_dashboards_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 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroup/{entityGroupId}/dashboards/export{?limit}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Dashboard]', # 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 + """getCustomerHomeDashboardInfo # noqa: 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_home_dashboard_info_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HomeDashboardInfo + 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_home_dashboard_info_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_customer_home_dashboard_info_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_customer_home_dashboard_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getCustomerHomeDashboardInfo # noqa: 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_home_dashboard_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HomeDashboardInfo + 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_customer_home_dashboard_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/dashboard/home/info', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HomeDashboardInfo', # 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_dashboard_by_id_using_get(self, dashboard_id, **kwargs): # noqa: E501 + """getDashboardById # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dashboard_by_id_using_get(dashboard_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str dashboard_id: dashboardId (required) + :return: Dashboard + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_dashboard_by_id_using_get_with_http_info(dashboard_id, **kwargs) # noqa: E501 + else: + (data) = self.get_dashboard_by_id_using_get_with_http_info(dashboard_id, **kwargs) # noqa: E501 + return data + + def get_dashboard_by_id_using_get_with_http_info(self, dashboard_id, **kwargs): # noqa: E501 + """getDashboardById # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dashboard_by_id_using_get_with_http_info(dashboard_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str dashboard_id: dashboardId (required) + :return: Dashboard + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['dashboard_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_dashboard_by_id_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 `get_dashboard_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'dashboard_id' in params: + path_params['dashboardId'] = params['dashboard_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/dashboard/{dashboardId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Dashboard', # 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_dashboard_info_by_id_using_get(self, dashboard_id, **kwargs): # noqa: E501 + """getDashboardInfoById # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dashboard_info_by_id_using_get(dashboard_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str dashboard_id: dashboardId (required) + :return: DashboardInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_dashboard_info_by_id_using_get_with_http_info(dashboard_id, **kwargs) # noqa: E501 + else: + (data) = self.get_dashboard_info_by_id_using_get_with_http_info(dashboard_id, **kwargs) # noqa: E501 + return data + + def get_dashboard_info_by_id_using_get_with_http_info(self, dashboard_id, **kwargs): # noqa: E501 + """getDashboardInfoById # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dashboard_info_by_id_using_get_with_http_info(dashboard_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str dashboard_id: dashboardId (required) + :return: DashboardInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['dashboard_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_dashboard_info_by_id_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 `get_dashboard_info_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'dashboard_id' in params: + path_params['dashboardId'] = params['dashboard_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/dashboard/info/{dashboardId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DashboardInfo', # 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_dashboards_by_entity_group_id_using_get(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 + """getDashboardsByEntityGroupId # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dashboards_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: entityGroupId (required) + :param int page_size: Page size (required) + :param int page: Page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :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_dashboards_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_dashboards_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_dashboards_by_entity_group_id_using_get_with_http_info(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 + """getDashboardsByEntityGroupId # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dashboards_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: entityGroupId (required) + :param int page_size: Page size (required) + :param int page: Page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataDashboardInfo + 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_dashboards_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_dashboards_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_dashboards_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_dashboards_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroup/{entityGroupId}/dashboards{?pageSize,page,textSearch,sortProperty,sortOrder}', '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_dashboards_by_ids_using_get(self, dashboard_ids, **kwargs): # noqa: E501 + """getDashboardsByIds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dashboards_by_ids_using_get(dashboard_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str dashboard_ids: dashboardIds (required) + :return: list[DashboardInfo] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_dashboards_by_ids_using_get_with_http_info(dashboard_ids, **kwargs) # noqa: E501 + else: + (data) = self.get_dashboards_by_ids_using_get_with_http_info(dashboard_ids, **kwargs) # noqa: E501 + return data + + def get_dashboards_by_ids_using_get_with_http_info(self, dashboard_ids, **kwargs): # noqa: E501 + """getDashboardsByIds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dashboards_by_ids_using_get_with_http_info(dashboard_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str dashboard_ids: dashboardIds (required) + :return: list[DashboardInfo] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['dashboard_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_dashboards_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'dashboard_ids' is set + if ('dashboard_ids' not in params or + params['dashboard_ids'] is None): + raise ValueError("Missing the required parameter `dashboard_ids` when calling `get_dashboards_by_ids_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'dashboard_ids' in params: + query_params.append(('dashboardIds', params['dashboard_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/dashboards{?dashboardIds}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DashboardInfo]', # 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_dashboards_using_get(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 + """getGroupDashboards # noqa: 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_dashboards_using_get(entity_group_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_group_id: entityGroupId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :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_group_dashboards_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_group_dashboards_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_group_dashboards_using_get_with_http_info(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 + """getGroupDashboards # noqa: 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_dashboards_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: entityGroupId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataDashboardInfo + 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_group_dashboards_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_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_group_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_group_dashboards_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 '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 '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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroup/{entityGroupId}/dashboards{?textSearch,sortProperty,sortOrder,pageSize,page}', '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_home_dashboard_info_using_get(self, **kwargs): # noqa: E501 + """getHomeDashboardInfo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_home_dashboard_info_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HomeDashboardInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_home_dashboard_info_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_home_dashboard_info_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_home_dashboard_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getHomeDashboardInfo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_home_dashboard_info_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HomeDashboardInfo + 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_home_dashboard_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/dashboard/home/info', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HomeDashboardInfo', # 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_home_dashboard_using_get(self, **kwargs): # noqa: E501 + """getHomeDashboard # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_home_dashboard_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HomeDashboard + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_home_dashboard_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_home_dashboard_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_home_dashboard_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getHomeDashboard # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_home_dashboard_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: HomeDashboard + 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_home_dashboard_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/dashboard/home', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HomeDashboard', # 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_max_datapoints_limit_using_get(self, **kwargs): # noqa: E501 + """getMaxDatapointsLimit # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_max_datapoints_limit_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :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.get_max_datapoints_limit_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_max_datapoints_limit_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_max_datapoints_limit_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getMaxDatapointsLimit # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_max_datapoints_limit_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: int + 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_max_datapoints_limit_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/dashboard/maxDatapointsLimit', 'GET', + 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 get_server_time_using_get(self, **kwargs): # noqa: E501 + """getServerTime # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_server_time_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :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.get_server_time_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_server_time_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_server_time_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getServerTime # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_server_time_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: int + 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_server_time_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/dashboard/serverTime', 'GET', + 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 get_tenant_dashboards_using_get(self, page_size, page, **kwargs): # noqa: E501 + """getTenantDashboards # noqa: 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_dashboards_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) + :param bool mobile: mobile + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :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_tenant_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getTenantDashboards # noqa: 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_dashboards_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) + :param bool mobile: mobile + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataDashboardInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_size', 'page', 'mobile', '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_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_tenant_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_tenant_dashboards_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'mobile' in params: + query_params.append(('mobile', params['mobile'])) # 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 '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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenant/dashboards{?mobile,textSearch,sortProperty,sortOrder,pageSize,page}', '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_tenant_dashboards_using_get1(self, tenant_id, page_size, page, **kwargs): # noqa: E501 + """getTenantDashboards # noqa: 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_dashboards_using_get1(tenant_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tenant_id: tenantId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :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_tenant_dashboards_using_get1_with_http_info(tenant_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_dashboards_using_get1_with_http_info(tenant_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, page, **kwargs): # noqa: E501 + """getTenantDashboards # noqa: 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_dashboards_using_get1_with_http_info(tenant_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tenant_id: tenantId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataDashboardInfo + 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_dashboards_using_get1" % 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_dashboards_using_get1`") # 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_dashboards_by_entity_group_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_dashboards_using_get1`") # 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_dashboards_by_entity_group_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_tenant_dashboards_using_get1`") # noqa: E501 - if 'page_size' in params and params['page_size'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `page_size` when calling `get_dashboards_by_entity_group_id_using_get`, must be a value greater than or equal to `1`") # noqa: E501 - if 'page' in params and params['page'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `page` when calling `get_dashboards_by_entity_group_id_using_get`, must be a value greater than or equal to `0`") # noqa: E501 collection_formats = {} path_params = {} - if 'entity_group_id' in params: - path_params['entityGroupId'] = params['entity_group_id'] # noqa: E501 + 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 + 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 = {} @@ -134,15 +1387,11 @@ def get_dashboards_by_entity_group_id_using_get_with_http_info(self, entity_grou header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/entityGroup/{entityGroupId}/dashboards{?pageSize,page,textSearch,sortProperty,sortOrder}', 'GET', + '/api/tenant/{tenantId}/dashboards{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, @@ -157,43 +1406,41 @@ def get_dashboards_by_entity_group_id_using_get_with_http_info(self, entity_grou _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_dashboards_by_ids_using_get(self, dashboard_ids, **kwargs): # noqa: E501 - """getDashboardsByIds # noqa: E501 + def get_tenant_home_dashboard_info_using_get(self, **kwargs): # noqa: E501 + """getTenantHomeDashboardInfo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_dashboards_by_ids_using_get(dashboard_ids, async_req=True) + >>> thread = api.get_tenant_home_dashboard_info_using_get(async_req=True) >>> result = thread.get() :param async_req bool - :param str dashboard_ids: dashboardIds (required) - :return: list[DashboardInfo] + :return: HomeDashboardInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_dashboards_by_ids_using_get_with_http_info(dashboard_ids, **kwargs) # noqa: E501 + return self.get_tenant_home_dashboard_info_using_get_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_dashboards_by_ids_using_get_with_http_info(dashboard_ids, **kwargs) # noqa: E501 + (data) = self.get_tenant_home_dashboard_info_using_get_with_http_info(**kwargs) # noqa: E501 return data - def get_dashboards_by_ids_using_get_with_http_info(self, dashboard_ids, **kwargs): # noqa: E501 - """getDashboardsByIds # noqa: E501 + def get_tenant_home_dashboard_info_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getTenantHomeDashboardInfo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_dashboards_by_ids_using_get_with_http_info(dashboard_ids, async_req=True) + >>> thread = api.get_tenant_home_dashboard_info_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str dashboard_ids: dashboardIds (required) - :return: list[DashboardInfo] + :return: HomeDashboardInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['dashboard_ids'] # noqa: E501 + all_params = [] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -201,21 +1448,19 @@ def get_dashboards_by_ids_using_get_with_http_info(self, dashboard_ids, **kwargs 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_home_dashboard_info_using_get" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'dashboard_ids' is set - if ('dashboard_ids' not in params or - params['dashboard_ids'] is None): - raise ValueError("Missing the required parameter `dashboard_ids` when calling `get_dashboards_by_ids_using_get`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'dashboard_ids' in params: - query_params.append(('dashboardIds', params['dashboard_ids'])) # noqa: E501 header_params = {} @@ -227,22 +1472,18 @@ def get_dashboards_by_ids_using_get_with_http_info(self, dashboard_ids, **kwargs header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/dashboards{?dashboardIds}', 'GET', + '/api/tenant/dashboard/home/info', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[DashboardInfo]', # noqa: E501 + response_type='HomeDashboardInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -250,53 +1491,57 @@ def get_dashboards_by_ids_using_get_with_http_info(self, dashboard_ids, **kwargs _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_group_dashboards_using_get(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 - """getGroupDashboards # noqa: E501 + def get_user_dashboards_using_get(self, page_size, page, **kwargs): # noqa: E501 + """getUserDashboards # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_group_dashboards_using_get(entity_group_id, page_size, page, async_req=True) + >>> thread = api.get_user_dashboards_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_group_id: entityGroupId (required) :param str page_size: pageSize (required) :param str page: page (required) + :param bool mobile: mobile :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder + :param str operation: operation + :param str user_id: userId :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_group_dashboards_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + return self.get_user_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_group_dashboards_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + (data) = self.get_user_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def get_group_dashboards_using_get_with_http_info(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 - """getGroupDashboards # noqa: E501 + def get_user_dashboards_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getUserDashboards # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_group_dashboards_using_get_with_http_info(entity_group_id, page_size, page, async_req=True) + >>> thread = api.get_user_dashboards_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_group_id: entityGroupId (required) :param str page_size: pageSize (required) :param str page: page (required) + :param bool mobile: mobile :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder + :param str operation: operation + :param str user_id: userId :return: PageDataDashboardInfo 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 = ['page_size', 'page', 'mobile', 'text_search', 'sort_property', 'sort_order', 'operation', 'user_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -304,35 +1549,39 @@ def get_group_dashboards_using_get_with_http_info(self, entity_group_id, page_si 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_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_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_group_dashboards_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_user_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_group_dashboards_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_user_dashboards_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 'mobile' in params: + query_params.append(('mobile', params['mobile'])) # 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 'operation' in params: + query_params.append(('operation', params['operation'])) # noqa: E501 + if 'user_id' in params: + query_params.append(('userId', params['user_id'])) # noqa: E501 if 'page_size' in params: query_params.append(('pageSize', params['page_size'])) # noqa: E501 if 'page' in params: @@ -348,15 +1597,11 @@ def get_group_dashboards_using_get_with_http_info(self, entity_group_id, page_si header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/entityGroup/{entityGroupId}/dashboards{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/user/dashboards{?mobile,textSearch,sortProperty,sortOrder,operation,userId,pageSize,page}', 'GET', path_params, query_params, header_params, @@ -371,51 +1616,47 @@ def get_group_dashboards_using_get_with_http_info(self, entity_group_id, page_si _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_dashboards_using_get(self, page_size, page, **kwargs): # noqa: E501 - """getTenantDashboards # noqa: E501 + def import_group_dashboards_using_post(self, body, entity_group_id, **kwargs): # noqa: E501 + """importGroupDashboards # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_dashboards_using_get(page_size, page, async_req=True) + >>> thread = api.import_group_dashboards_using_post(body, entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataDashboardInfo + :param list[Dashboard] body: dashboardList (required) + :param str entity_group_id: entityGroupId (required) + :param bool overwrite: overwrite + :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_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.import_group_dashboards_using_post_with_http_info(body, entity_group_id, **kwargs) # noqa: E501 else: - (data) = self.get_tenant_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.import_group_dashboards_using_post_with_http_info(body, entity_group_id, **kwargs) # noqa: E501 return data - def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """getTenantDashboards # noqa: E501 + def import_group_dashboards_using_post_with_http_info(self, body, entity_group_id, **kwargs): # noqa: E501 + """importGroupDashboards # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_dashboards_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.import_group_dashboards_using_post_with_http_info(body, entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataDashboardInfo + :param list[Dashboard] body: dashboardList (required) + :param str entity_group_id: entityGroupId (required) + :param bool overwrite: overwrite + :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', 'entity_group_id', 'overwrite'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -423,33 +1664,31 @@ def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwar 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 import_group_dashboards_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_tenant_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_tenant_dashboards_using_get`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `import_group_dashboards_using_post`") # 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 `import_group_dashboards_using_post`") # noqa: E501 collection_formats = {} path_params = {} + if 'entity_group_id' in params: + path_params['entityGroupId'] = params['entity_group_id'] # noqa: E501 query_params = [] - 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 '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 'overwrite' in params: + query_params.append(('overwrite', params['overwrite'])) # noqa: E501 header_params = {} @@ -457,10 +1696,8 @@ def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwar local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -469,14 +1706,14 @@ def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwar auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/tenant/dashboards{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/entityGroup/{entityGroupId}/dashboards/import{?overwrite}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataDashboardInfo', # 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'), @@ -484,53 +1721,45 @@ def get_tenant_dashboards_using_get_with_http_info(self, page_size, page, **kwar _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_dashboards_using_get1(self, tenant_id, page_size, page, **kwargs): # noqa: E501 - """getTenantDashboards # noqa: E501 + def save_dashboard_using_post(self, body, **kwargs): # noqa: E501 + """saveDashboard # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_dashboards_using_get1(tenant_id, page_size, page, async_req=True) + >>> thread = api.save_dashboard_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_id: tenantId (required) - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataDashboardInfo + :param Dashboard body: dashboard (required) + :param str entity_group_id: entityGroupId + :return: Dashboard 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_dashboards_using_get1_with_http_info(tenant_id, page_size, page, **kwargs) # noqa: E501 + return self.save_dashboard_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.get_tenant_dashboards_using_get1_with_http_info(tenant_id, page_size, page, **kwargs) # noqa: E501 + (data) = self.save_dashboard_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, page, **kwargs): # noqa: E501 - """getTenantDashboards # noqa: E501 + def save_dashboard_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveDashboard # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_dashboards_using_get1_with_http_info(tenant_id, page_size, page, async_req=True) + >>> thread = api.save_dashboard_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str tenant_id: tenantId (required) - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataDashboardInfo + :param Dashboard body: dashboard (required) + :param str entity_group_id: entityGroupId + :return: Dashboard 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 = ['body', 'entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -538,39 +1767,25 @@ def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, 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_dashboard_using_post" % 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_dashboards_using_get1`") # 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_dashboards_using_get1`") # 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_dashboards_using_get1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_dashboard_using_post`") # noqa: E501 collection_formats = {} path_params = {} - if 'tenant_id' in params: - path_params['tenantId'] = params['tenant_id'] # noqa: E501 query_params = [] - 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 '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 'entity_group_id' in params: + query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 header_params = {} @@ -578,6 +1793,8 @@ def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, 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( ['*/*']) # noqa: E501 @@ -590,14 +1807,14 @@ def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/tenant/{tenantId}/dashboards{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/dashboard{?entityGroupId}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataDashboardInfo', # noqa: E501 + response_type='Dashboard', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -605,55 +1822,43 @@ def get_tenant_dashboards_using_get1_with_http_info(self, tenant_id, page_size, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_user_dashboards_using_get(self, page_size, page, **kwargs): # noqa: E501 - """getUserDashboards # noqa: E501 + def set_customer_home_dashboard_info_using_post(self, body, **kwargs): # noqa: E501 + """setCustomerHomeDashboardInfo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_dashboards_using_get(page_size, page, async_req=True) + >>> thread = api.set_customer_home_dashboard_info_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str operation: operation - :param str user_id: userId - :return: PageDataDashboardInfo + :param HomeDashboardInfo body: homeDashboardInfo (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_user_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.set_customer_home_dashboard_info_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.get_user_dashboards_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.set_customer_home_dashboard_info_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def get_user_dashboards_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """getUserDashboards # noqa: E501 + def set_customer_home_dashboard_info_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """setCustomerHomeDashboardInfo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_dashboards_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.set_customer_home_dashboard_info_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param str operation: operation - :param str user_id: userId - :return: PageDataDashboardInfo + :param HomeDashboardInfo body: homeDashboardInfo (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'operation', 'user_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') @@ -661,37 +1866,23 @@ def get_user_dashboards_using_get_with_http_info(self, page_size, page, **kwargs 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_customer_home_dashboard_info_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_user_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_user_dashboards_using_get`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `set_customer_home_dashboard_info_using_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - 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 'operation' in params: - query_params.append(('operation', params['operation'])) # noqa: E501 - if 'user_id' in params: - query_params.append(('userId', params['user_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 header_params = {} @@ -699,10 +1890,8 @@ def get_user_dashboards_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( - ['*/*']) # noqa: E501 - + 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 @@ -711,14 +1900,14 @@ def get_user_dashboards_using_get_with_http_info(self, page_size, page, **kwargs auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/user/dashboards{?textSearch,sortProperty,sortOrder,operation,userId,pageSize,page}', 'GET', + '/api/customer/dashboard/home/info', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataDashboardInfo', # 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'), @@ -726,45 +1915,43 @@ def get_user_dashboards_using_get_with_http_info(self, page_size, page, **kwargs _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_dashboard_using_post(self, dashboard, **kwargs): # noqa: E501 - """saveDashboard # noqa: E501 + def set_tenant_home_dashboard_info_using_post(self, body, **kwargs): # noqa: E501 + """setTenantHomeDashboardInfo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_dashboard_using_post(dashboard, async_req=True) + >>> thread = api.set_tenant_home_dashboard_info_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Dashboard dashboard: dashboard (required) - :param str entity_group_id: entityGroupId - :return: Dashboard + :param HomeDashboardInfo body: homeDashboardInfo (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.save_dashboard_using_post_with_http_info(dashboard, **kwargs) # noqa: E501 + return self.set_tenant_home_dashboard_info_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_dashboard_using_post_with_http_info(dashboard, **kwargs) # noqa: E501 + (data) = self.set_tenant_home_dashboard_info_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_dashboard_using_post_with_http_info(self, dashboard, **kwargs): # noqa: E501 - """saveDashboard # noqa: E501 + def set_tenant_home_dashboard_info_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """setTenantHomeDashboardInfo # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_dashboard_using_post_with_http_info(dashboard, async_req=True) + >>> thread = api.set_tenant_home_dashboard_info_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Dashboard dashboard: dashboard (required) - :param str entity_group_id: entityGroupId - :return: Dashboard + :param HomeDashboardInfo body: homeDashboardInfo (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['dashboard', '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') @@ -772,21 +1959,23 @@ def save_dashboard_using_post_with_http_info(self, dashboard, **kwargs): # noqa 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_tenant_home_dashboard_info_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'dashboard' is set - if ('dashboard' not in params or - params['dashboard'] is None): - raise ValueError("Missing the required parameter `dashboard` when calling `save_dashboard_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `set_tenant_home_dashboard_info_using_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'entity_group_id' in params: - query_params.append(('entityGroupId', params['entity_group_id'])) # noqa: E501 header_params = {} @@ -794,12 +1983,8 @@ def save_dashboard_using_post_with_http_info(self, dashboard, **kwargs): # noqa local_var_files = {} body_params = None - if 'dashboard' in params: - body_params = params['dashboard'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -808,14 +1993,14 @@ def save_dashboard_using_post_with_http_info(self, dashboard, **kwargs): # noqa auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/dashboard{?entityGroupId}', 'POST', + '/api/tenant/dashboard/home/info', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Dashboard', # 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'), 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 faa110e8..70746134 100644 --- a/tb_rest_client/api/api_pe/device_controller_api.py +++ b/tb_rest_client/api/api_pe/device_controller_api.py @@ -1,78 +1,1286 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import -import re # noqa: F401 +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from tb_rest_client.api_client import ApiClient + + +class DeviceControllerApi(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 assign_device_to_tenant_using_post(self, tenant_id, device_id, **kwargs): # noqa: E501 + """assignDeviceToTenant # 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_device_to_tenant_using_post(tenant_id, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tenant_id: tenantId (required) + :param str device_id: deviceId (required) + :return: Device + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.assign_device_to_tenant_using_post_with_http_info(tenant_id, device_id, **kwargs) # noqa: E501 + else: + (data) = self.assign_device_to_tenant_using_post_with_http_info(tenant_id, device_id, **kwargs) # noqa: E501 + return data + + def assign_device_to_tenant_using_post_with_http_info(self, tenant_id, device_id, **kwargs): # noqa: E501 + """assignDeviceToTenant # 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_device_to_tenant_using_post_with_http_info(tenant_id, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tenant_id: tenantId (required) + :param str device_id: deviceId (required) + :return: Device + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['tenant_id', '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 assign_device_to_tenant_using_post" % 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 `assign_device_to_tenant_using_post`") # noqa: E501 + # 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 `assign_device_to_tenant_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'tenant_id' in params: + path_params['tenantId'] = params['tenant_id'] # noqa: E501 + 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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenant/{tenantId}/device/{deviceId}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Device', # 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 claim_device_using_post(self, device_name, **kwargs): # noqa: E501 + """claimDevice # 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) + >>> result = thread.get() + + :param async_req bool + :param str device_name: deviceName (required) + :param ClaimRequest body: claimRequest + :param str sub_customer_id: subCustomerId + :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_name, **kwargs) # noqa: E501 + else: + (data) = self.claim_device_using_post_with_http_info(device_name, **kwargs) # noqa: E501 + return data + + def claim_device_using_post_with_http_info(self, device_name, **kwargs): # noqa: E501 + """claimDevice # 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) + >>> result = thread.get() + + :param async_req bool + :param str device_name: deviceName (required) + :param ClaimRequest body: claimRequest + :param str sub_customer_id: subCustomerId + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_name', 'body', 'sub_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 claim_device_using_post" % 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 + + collection_formats = {} + + path_params = {} + if 'device_name' in params: + path_params['deviceName'] = params['device_name'] # noqa: E501 + + query_params = [] + if 'sub_customer_id' in params: + query_params.append(('subCustomerId', params['sub_customer_id'])) # 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( + ['*/*']) # 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/customer/device/{deviceName}/claim{?subCustomerId}', '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 count_by_device_group_and_empty_ota_package_using_get(self, ota_package_type, ota_package_id, entity_group_id, **kwargs): # noqa: E501 + """countByDeviceGroupAndEmptyOtaPackage # 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_by_device_group_and_empty_ota_package_using_get(ota_package_type, ota_package_id, entity_group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ota_package_type: otaPackageType (required) + :param str ota_package_id: otaPackageId (required) + :param str entity_group_id: entityGroupId (required) + :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_by_device_group_and_empty_ota_package_using_get_with_http_info(ota_package_type, ota_package_id, entity_group_id, **kwargs) # noqa: E501 + else: + (data) = self.count_by_device_group_and_empty_ota_package_using_get_with_http_info(ota_package_type, ota_package_id, entity_group_id, **kwargs) # noqa: E501 + return data + + def count_by_device_group_and_empty_ota_package_using_get_with_http_info(self, ota_package_type, ota_package_id, entity_group_id, **kwargs): # noqa: E501 + """countByDeviceGroupAndEmptyOtaPackage # 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_by_device_group_and_empty_ota_package_using_get_with_http_info(ota_package_type, ota_package_id, entity_group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ota_package_type: otaPackageType (required) + :param str ota_package_id: otaPackageId (required) + :param str entity_group_id: entityGroupId (required) + :return: int + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ota_package_type', 'ota_package_id', 'entity_group_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 count_by_device_group_and_empty_ota_package_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'ota_package_type' is set + if ('ota_package_type' not in params or + params['ota_package_type'] is None): + raise ValueError("Missing the required parameter `ota_package_type` when calling `count_by_device_group_and_empty_ota_package_using_get`") # 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): + raise ValueError("Missing the required parameter `ota_package_id` when calling `count_by_device_group_and_empty_ota_package_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 `count_by_device_group_and_empty_ota_package_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ota_package_type' in params: + path_params['otaPackageType'] = params['ota_package_type'] # noqa: E501 + if 'ota_package_id' in params: + path_params['otaPackageId'] = params['ota_package_id'] # noqa: E501 + if 'entity_group_id' in params: + path_params['entityGroupId'] = params['entity_group_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}', 'GET', + 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_by_device_profile_and_empty_ota_package_using_get(self, ota_package_type, device_profile_id, **kwargs): # noqa: E501 + """countByDeviceProfileAndEmptyOtaPackage # 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_by_device_profile_and_empty_ota_package_using_get(ota_package_type, device_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ota_package_type: otaPackageType (required) + :param str device_profile_id: deviceProfileId (required) + :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_by_device_profile_and_empty_ota_package_using_get_with_http_info(ota_package_type, device_profile_id, **kwargs) # noqa: E501 + else: + (data) = self.count_by_device_profile_and_empty_ota_package_using_get_with_http_info(ota_package_type, device_profile_id, **kwargs) # noqa: E501 + return data + + def count_by_device_profile_and_empty_ota_package_using_get_with_http_info(self, ota_package_type, device_profile_id, **kwargs): # noqa: E501 + """countByDeviceProfileAndEmptyOtaPackage # 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_by_device_profile_and_empty_ota_package_using_get_with_http_info(ota_package_type, device_profile_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ota_package_type: otaPackageType (required) + :param str device_profile_id: deviceProfileId (required) + :return: int + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ota_package_type', 'device_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 count_by_device_profile_and_empty_ota_package_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'ota_package_type' is set + if ('ota_package_type' not in params or + params['ota_package_type'] is None): + raise ValueError("Missing the required parameter `ota_package_type` when calling `count_by_device_profile_and_empty_ota_package_using_get`") # noqa: E501 + # verify the required parameter 'device_profile_id' is set + if ('device_profile_id' not in params or + params['device_profile_id'] is None): + raise ValueError("Missing the required parameter `device_profile_id` when calling `count_by_device_profile_and_empty_ota_package_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ota_package_type' in params: + path_params['otaPackageType'] = params['ota_package_type'] # noqa: E501 + if 'device_profile_id' in params: + path_params['deviceProfileId'] = params['device_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/devices/count/{otaPackageType}/{deviceProfileId}', 'GET', + 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 delete_device_using_delete(self, device_id, **kwargs): # noqa: E501 + """deleteDevice # 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_device_using_delete(device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_id: deviceId (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_device_using_delete_with_http_info(device_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_device_using_delete_with_http_info(device_id, **kwargs) # noqa: E501 + return data + + def delete_device_using_delete_with_http_info(self, device_id, **kwargs): # noqa: E501 + """deleteDevice # 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_device_using_delete_with_http_info(device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_id: deviceId (required) + :return: None + 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 delete_device_using_delete" % 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 `delete_device_using_delete`") # 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 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/device/{deviceId}', '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 find_by_query_using_post1(self, body, **kwargs): # noqa: E501 + """findByQuery # 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_by_query_using_post1(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DeviceSearchQuery body: query (required) + :return: list[Device] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find_by_query_using_post1_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.find_by_query_using_post1_with_http_info(body, **kwargs) # noqa: E501 + return data + + def find_by_query_using_post1_with_http_info(self, body, **kwargs): # noqa: E501 + """findByQuery # 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_by_query_using_post1_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DeviceSearchQuery body: query (required) + :return: list[Device] + 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 find_by_query_using_post1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_by_query_using_post1`") # noqa: E501 + + 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( + ['*/*']) # 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/devices', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Device]', # 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 + """getCustomerDevices # noqa: 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_devices_using_get(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataDevice + 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_devices_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_devices_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerDevices # noqa: 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_devices_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataDevice + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_devices_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_devices_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_devices_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_devices_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 + + query_params = [] + 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 + 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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}/devices{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataDevice', # 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_by_id_using_get(self, device_id, **kwargs): # noqa: E501 + """getDeviceById # noqa: 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_by_id_using_get(device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_id: deviceId (required) + :return: Device + 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_by_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 + else: + (data) = self.get_device_by_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 + return data + + def get_device_by_id_using_get_with_http_info(self, device_id, **kwargs): # noqa: E501 + """getDeviceById # noqa: 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_by_id_using_get_with_http_info(device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_id: deviceId (required) + :return: Device + 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_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_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/device/{deviceId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Device', # 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_credentials_by_device_id_using_get(self, device_id, **kwargs): # noqa: E501 + """getDeviceCredentialsByDeviceId # noqa: 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_credentials_by_device_id_using_get(device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_id: deviceId (required) + :return: DeviceCredentials + 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_credentials_by_device_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 + else: + (data) = self.get_device_credentials_by_device_id_using_get_with_http_info(device_id, **kwargs) # noqa: E501 + return data + + def get_device_credentials_by_device_id_using_get_with_http_info(self, device_id, **kwargs): # noqa: E501 + """getDeviceCredentialsByDeviceId # noqa: 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_credentials_by_device_id_using_get_with_http_info(device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_id: deviceId (required) + :return: DeviceCredentials + 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_credentials_by_device_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_credentials_by_device_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/device/{deviceId}/credentials', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeviceCredentials', # 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 + """getDeviceTypes # noqa: 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_types_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[EntitySubtype] + 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_types_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_device_types_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_device_types_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getDeviceTypes # noqa: 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_types_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[EntitySubtype] + 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_device_types_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/device/types', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntitySubtype]', # 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_devices_by_entity_group_id_using_get(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 + """getDevicesByEntityGroupId # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_devices_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: entityGroupId (required) + :param str page_size: Page size (required) + :param str page: Page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataDevice + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_devices_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_devices_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_devices_by_entity_group_id_using_get_with_http_info(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 + """getDevicesByEntityGroupId # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_devices_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: entityGroupId (required) + :param str page_size: Page size (required) + :param str page: Page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataDevice + 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_devices_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_devices_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_devices_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_devices_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 '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 '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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroup/{entityGroupId}/devices{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataDevice', # 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_devices_by_ids_using_get(self, device_ids, **kwargs): # noqa: E501 + """getDevicesByIds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_devices_by_ids_using_get(device_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_ids: deviceIds (required) + :return: list[Device] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_devices_by_ids_using_get_with_http_info(device_ids, **kwargs) # noqa: E501 + else: + (data) = self.get_devices_by_ids_using_get_with_http_info(device_ids, **kwargs) # noqa: E501 + return data + + def get_devices_by_ids_using_get_with_http_info(self, device_ids, **kwargs): # noqa: E501 + """getDevicesByIds # noqa: E501 -# python 2 and python 3 compatibility library -import six + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_devices_by_ids_using_get_with_http_info(device_ids, async_req=True) + >>> result = thread.get() -from tb_rest_client.api.api_ce import DeviceControllerApi + :param async_req bool + :param str device_ids: deviceIds (required) + :return: list[Device] + If the method is called asynchronously, + returns the request thread. + """ + all_params = ['device_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') -class DeviceControllerApi(DeviceControllerApi): - """NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - """ + 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_devices_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_ids' is set + if ('device_ids' not in params or + params['device_ids'] is None): + raise ValueError("Missing the required parameter `device_ids` when calling `get_devices_by_ids_using_get`") # noqa: E501 - def __init__(self, api_client=None): - super(DeviceControllerApi, self).__init__(api_client) + collection_formats = {} - def claim_device_using_post(self, device_name, **kwargs): # noqa: E501 - """claimDevice # noqa: E501 + path_params = {} + + query_params = [] + if 'device_ids' in params: + query_params.append(('deviceIds', params['device_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/devices{?deviceIds}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Device]', # 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_device_using_get(self, device_name, **kwargs): # noqa: E501 + """getTenantDevice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.claim_device_using_post(device_name, async_req=True) + >>> thread = api.get_tenant_device_using_get(device_name, async_req=True) >>> result = thread.get() :param async_req bool :param str device_name: deviceName (required) - :param ClaimRequest claim_request: claimRequest - :param str sub_customer_id: subCustomerId - :return: DeferredResultResponseEntity + :return: Device 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_name, **kwargs) # noqa: E501 + return self.get_tenant_device_using_get_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.get_tenant_device_using_get_with_http_info(device_name, **kwargs) # noqa: E501 return data - def claim_device_using_post_with_http_info(self, device_name, **kwargs): # noqa: E501 - """claimDevice # noqa: E501 + def get_tenant_device_using_get_with_http_info(self, device_name, **kwargs): # noqa: E501 + """getTenantDevice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.claim_device_using_post_with_http_info(device_name, async_req=True) + >>> thread = api.get_tenant_device_using_get_with_http_info(device_name, async_req=True) >>> result = thread.get() :param async_req bool :param str device_name: deviceName (required) - :param ClaimRequest claim_request: claimRequest - :param str sub_customer_id: subCustomerId - :return: DeferredResultResponseEntity + :return: Device If the method is called asynchronously, returns the request thread. """ - all_params = ['device_name', 'claim_request', 'sub_customer_id'] # noqa: E501 + all_params = ['device_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -80,23 +1288,25 @@ def claim_device_using_post_with_http_info(self, device_name, **kwargs): # noqa 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_device_using_get" % 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 `get_tenant_device_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'device_name' in params: - path_params['deviceName'] = params['device_name'] # noqa: E501 query_params = [] - if 'sub_customer_id' in params: - query_params.append(('subCustomerId', params['sub_customer_id'])) # noqa: E501 + if 'device_name' in params: + query_params.append(('deviceName', params['device_name'])) # noqa: E501 header_params = {} @@ -104,28 +1314,22 @@ def claim_device_using_post_with_http_info(self, device_name, **kwargs): # noqa local_var_files = {} body_params = None - if 'claim_request' in params: - body_params = params['claim_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/customer/device/{deviceName}/claim{?subCustomerId}', 'POST', + '/api/tenant/devices{?deviceName}', '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='Device', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -133,16 +1337,15 @@ def claim_device_using_post_with_http_info(self, device_name, **kwargs): # noqa _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 - """getCustomerDevices # noqa: E501 + def get_tenant_devices_using_get(self, page_size, page, **kwargs): # noqa: E501 + """getTenantDevices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_devices_using_get(customer_id, page_size, page, async_req=True) + >>> thread = api.get_tenant_devices_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str customer_id: customerId (required) :param str page_size: pageSize (required) :param str page: page (required) :param str type: type @@ -155,21 +1358,20 @@ def get_customer_devices_using_get(self, customer_id, page_size, page, **kwargs) """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_customer_devices_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + return self.get_tenant_devices_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_customer_devices_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + (data) = self.get_tenant_devices_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 - """getCustomerDevices # noqa: E501 + def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getTenantDevices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_devices_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> thread = api.get_tenant_devices_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str customer_id: customerId (required) :param str page_size: pageSize (required) :param str page: page (required) :param str type: type @@ -181,7 +1383,7 @@ def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, returns the request thread. """ - all_params = ['customer_id', 'page_size', 'page', 'type', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['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') @@ -189,27 +1391,25 @@ def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, 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_devices_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_devices_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_devices_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_tenant_devices_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_devices_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_tenant_devices_using_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'customer_id' in params: - path_params['customerId'] = params['customer_id'] # noqa: E501 query_params = [] if 'type' in params: @@ -235,15 +1435,11 @@ def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/customer/{customerId}/devices{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/tenant/devices{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, @@ -258,18 +1454,18 @@ def get_customer_devices_using_get_with_http_info(self, customer_id, page_size, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_devices_by_entity_group_id_using_get(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 - """getDevicesByEntityGroupId # noqa: E501 + def get_user_devices_using_get(self, page_size, page, **kwargs): # noqa: E501 + """getUserDevices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_devices_by_entity_group_id_using_get(entity_group_id, page_size, page, async_req=True) + >>> thread = api.get_user_devices_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_group_id: entityGroupId (required) - :param str page_size: Page size (required) - :param str page: Page (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder @@ -279,23 +1475,23 @@ def get_devices_by_entity_group_id_using_get(self, entity_group_id, page_size, p """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_devices_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + return self.get_user_devices_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_devices_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + (data) = self.get_user_devices_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 return data - def get_devices_by_entity_group_id_using_get_with_http_info(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 - """getDevicesByEntityGroupId # noqa: E501 + def get_user_devices_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getUserDevices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_devices_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, async_req=True) + >>> thread = api.get_user_devices_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str entity_group_id: entityGroupId (required) - :param str page_size: Page size (required) - :param str page: Page (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder @@ -304,7 +1500,7 @@ def get_devices_by_entity_group_id_using_get_with_http_info(self, entity_group_i returns the request thread. """ - all_params = ['entity_group_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['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') @@ -312,33 +1508,29 @@ def get_devices_by_entity_group_id_using_get_with_http_info(self, entity_group_i 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_devices_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_devices_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_devices_by_entity_group_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_user_devices_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_devices_by_entity_group_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_user_devices_using_get`") # noqa: E501 - if 'page_size' in params and params['page_size'] < 1.0: # noqa: E501 - raise ValueError("Invalid value for parameter `page_size` when calling `get_devices_by_entity_group_id_using_get`, must be a value greater than or equal to `1.0`") # noqa: E501 - if 'page' in params and params['page'] < 0.0: # noqa: E501 - raise ValueError("Invalid value for parameter `page` when calling `get_devices_by_entity_group_id_using_get`, must be a value greater than or equal to `0.0`") # noqa: E501 collection_formats = {} path_params = {} - if 'entity_group_id' in params: - path_params['entityGroupId'] = params['entity_group_id'] # noqa: E501 query_params = [] + 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: @@ -360,15 +1552,11 @@ def get_devices_by_entity_group_id_using_get_with_http_info(self, entity_group_i header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/entityGroup/{entityGroupId}/devices{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/user/devices{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, @@ -383,53 +1571,43 @@ def get_devices_by_entity_group_id_using_get_with_http_info(self, entity_group_i _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_tenant_devices_using_get(self, page_size, page, **kwargs): # noqa: E501 - """getTenantDevices # noqa: E501 + def re_claim_device_using_delete(self, device_name, **kwargs): # noqa: E501 + """reClaimDevice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_devices_using_get(page_size, page, async_req=True) + >>> thread = api.re_claim_device_using_delete(device_name, async_req=True) >>> result = thread.get() :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataDevice + :param str device_name: deviceName (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_tenant_devices_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.re_claim_device_using_delete_with_http_info(device_name, **kwargs) # noqa: E501 else: - (data) = self.get_tenant_devices_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.re_claim_device_using_delete_with_http_info(device_name, **kwargs) # noqa: E501 return data - def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """getTenantDevices # noqa: E501 + def re_claim_device_using_delete_with_http_info(self, device_name, **kwargs): # noqa: E501 + """reClaimDevice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_devices_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.re_claim_device_using_delete_with_http_info(device_name, async_req=True) >>> result = thread.get() :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataDevice + :param str device_name: deviceName (required) + :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['page_size', 'page', 'type', 'text_search', 'sort_property', 'sort_order'] # noqa: E501 + all_params = ['device_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -437,35 +1615,25 @@ def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs) 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 re_claim_device_using_delete" % 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_tenant_devices_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_devices_using_get`") # noqa: E501 + # 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 `re_claim_device_using_delete`") # noqa: E501 collection_formats = {} path_params = {} + if 'device_name' in params: + path_params['deviceName'] = params['device_name'] # noqa: E501 query_params = [] - 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 - 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 = {} @@ -477,22 +1645,18 @@ def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs) header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/devices{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/customer/device/{deviceName}/claim', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataDevice', # 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'), @@ -500,53 +1664,43 @@ def get_tenant_devices_using_get_with_http_info(self, page_size, page, **kwargs) _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_user_devices_using_get(self, page_size, page, **kwargs): # noqa: E501 - """getUserDevices # noqa: E501 + def save_device_credentials_using_post(self, body, **kwargs): # noqa: E501 + """saveDeviceCredentials # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_devices_using_get(page_size, page, async_req=True) + >>> thread = api.save_device_credentials_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataDevice + :param DeviceCredentials body: deviceCredentials (required) + :return: DeviceCredentials 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_devices_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return self.save_device_credentials_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.get_user_devices_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + (data) = self.save_device_credentials_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def get_user_devices_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """getUserDevices # noqa: E501 + def save_device_credentials_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveDeviceCredentials # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_devices_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.save_device_credentials_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str type: type - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataDevice + :param DeviceCredentials body: deviceCredentials (required) + :return: DeviceCredentials If the method is called asynchronously, returns the request thread. """ - all_params = ['page_size', 'page', 'type', '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') @@ -554,35 +1708,23 @@ def get_user_devices_using_get_with_http_info(self, page_size, page, **kwargs): 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_device_credentials_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_user_devices_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_devices_using_get`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_device_credentials_using_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - 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 - 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 = {} @@ -590,6 +1732,8 @@ def get_user_devices_using_get_with_http_info(self, page_size, page, **kwargs): 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( ['*/*']) # noqa: E501 @@ -602,14 +1746,14 @@ def get_user_devices_using_get_with_http_info(self, page_size, page, **kwargs): auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/user/devices{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/device/credentials', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataDevice', # noqa: E501 + response_type='DeviceCredentials', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -617,16 +1761,16 @@ def get_user_devices_using_get_with_http_info(self, page_size, page, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_device_using_post(self, device, **kwargs): # noqa: E501 + def save_device_using_post(self, body, **kwargs): # noqa: E501 """saveDevice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_device_using_post(device, async_req=True) + >>> thread = api.save_device_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Device device: device (required) + :param Device body: device (required) :param str access_token: accessToken :param str entity_group_id: entityGroupId :return: Device @@ -635,21 +1779,21 @@ def save_device_using_post(self, device, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_device_using_post_with_http_info(device, **kwargs) # noqa: E501 + return self.save_device_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_device_using_post_with_http_info(device, **kwargs) # noqa: E501 + (data) = self.save_device_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_device_using_post_with_http_info(self, device, **kwargs): # noqa: E501 + def save_device_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveDevice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_device_using_post_with_http_info(device, async_req=True) + >>> thread = api.save_device_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Device device: device (required) + :param Device body: device (required) :param str access_token: accessToken :param str entity_group_id: entityGroupId :return: Device @@ -657,7 +1801,7 @@ def save_device_using_post_with_http_info(self, device, **kwargs): # noqa: E501 returns the request thread. """ - all_params = ['device', 'access_token', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'access_token', 'entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -665,13 +1809,17 @@ def save_device_using_post_with_http_info(self, device, **kwargs): # noqa: E501 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_device_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'device' is set - if ('device' not in params or - params['device'] is None): - raise ValueError("Missing the required parameter `device` when calling `save_device_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_device_using_post`") # noqa: E501 collection_formats = {} @@ -689,8 +1837,8 @@ def save_device_using_post_with_http_info(self, device, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'device' in params: - body_params = params['device'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 new file mode 100644 index 00000000..fbb7799a --- /dev/null +++ b/tb_rest_client/api/api_pe/device_group_ota_package_controller_api.py @@ -0,0 +1,320 @@ +# 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 +""" + +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 DeviceGroupOtaPackageControllerApi(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_device_group_ota_package_using_delete(self, id, **kwargs): # noqa: E501 + """deleteDeviceGroupOtaPackage # 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_device_group_ota_package_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_device_group_ota_package_using_delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_device_group_ota_package_using_delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_device_group_ota_package_using_delete_with_http_info(self, id, **kwargs): # noqa: E501 + """deleteDeviceGroupOtaPackage # 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_device_group_ota_package_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_device_group_ota_package_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_device_group_ota_package_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 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/deviceGroupOtaPackage/{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_firmware_by_id_using_get(self, group_id, firmware_type, **kwargs): # noqa: E501 + """getFirmwareById # noqa: 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_by_id_using_get(group_id, firmware_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str group_id: groupId (required) + :param str firmware_type: firmwareType (required) + :return: DeviceGroupOtaPackage + 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_by_id_using_get_with_http_info(group_id, firmware_type, **kwargs) # noqa: E501 + else: + (data) = self.get_firmware_by_id_using_get_with_http_info(group_id, firmware_type, **kwargs) # noqa: E501 + return data + + def get_firmware_by_id_using_get_with_http_info(self, group_id, firmware_type, **kwargs): # noqa: E501 + """getFirmwareById # noqa: 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_by_id_using_get_with_http_info(group_id, firmware_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str group_id: groupId (required) + :param str firmware_type: firmwareType (required) + :return: DeviceGroupOtaPackage + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['group_id', 'firmware_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_firmware_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'group_id' is set + if ('group_id' not in params or + params['group_id'] is None): + raise ValueError("Missing the required parameter `group_id` when calling `get_firmware_by_id_using_get`") # noqa: E501 + # verify the required parameter 'firmware_type' is set + if ('firmware_type' not in params or + params['firmware_type'] is None): + raise ValueError("Missing the required parameter `firmware_type` when calling `get_firmware_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group_id' in params: + path_params['groupId'] = params['group_id'] # noqa: E501 + if 'firmware_type' in params: + path_params['firmwareType'] = params['firmware_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/deviceGroupOtaPackage/{groupId}/{firmwareType}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeviceGroupOtaPackage', # 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_device_group_ota_package_using_post(self, body, **kwargs): # noqa: E501 + """saveDeviceGroupOtaPackage # 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_group_ota_package_using_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DeviceGroupOtaPackage body: deviceGroupOtaPackage (required) + :return: DeviceGroupOtaPackage + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_device_group_ota_package_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.save_device_group_ota_package_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def save_device_group_ota_package_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveDeviceGroupOtaPackage # 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_group_ota_package_using_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DeviceGroupOtaPackage body: deviceGroupOtaPackage (required) + :return: DeviceGroupOtaPackage + 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_device_group_ota_package_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_device_group_ota_package_using_post`") # noqa: E501 + + 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( + ['*/*']) # 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/deviceGroupOtaPackage', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeviceGroupOtaPackage', # 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/edge_controller_api.py b/tb_rest_client/api/api_pe/edge_controller_api.py new file mode 100644 index 00000000..a099cea8 --- /dev/null +++ b/tb_rest_client/api/api_pe/edge_controller_api.py @@ -0,0 +1,1843 @@ +# 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 +""" + +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 EdgeControllerApi(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 activate_instance_using_post(self, license_secret, release_date, **kwargs): # noqa: E501 + """activateInstance # 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: object + 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 + """activateInstance # 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: object + 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( + ['*/*']) # 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='object', # 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_instance_using_post(self, body, **kwargs): # noqa: E501 + """checkInstance # 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param object body: request (required) + :return: object + 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(body, **kwargs) # noqa: E501 + else: + (data) = self.check_instance_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def check_instance_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """checkInstance # 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param object body: request (required) + :return: object + 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'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `check_instance_using_post`") # noqa: E501 + + 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( + ['*/*']) # 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='object', # 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 + """deleteEdge # 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_edge_using_delete(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (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_edge_using_delete_with_http_info(edge_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_edge_using_delete_with_http_info(edge_id, **kwargs) # noqa: E501 + return data + + def delete_edge_using_delete_with_http_info(self, edge_id, **kwargs): # noqa: E501 + """deleteEdge # 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_edge_using_delete_with_http_info(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :return: None + 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 delete_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 `delete_edge_using_delete`") # 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 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/{edgeId}', '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 find_by_query_using_post2(self, body, **kwargs): # noqa: E501 + """findByQuery # 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_by_query_using_post2(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param EdgeSearchQuery body: query (required) + :return: list[Edge] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find_by_query_using_post2_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.find_by_query_using_post2_with_http_info(body, **kwargs) # noqa: E501 + return data + + def find_by_query_using_post2_with_http_info(self, body, **kwargs): # noqa: E501 + """findByQuery # 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_by_query_using_post2_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param EdgeSearchQuery body: query (required) + :return: list[Edge] + 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 find_by_query_using_post2" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_by_query_using_post2`") # noqa: E501 + + 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( + ['*/*']) # 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/edges', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Edge]', # 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_missing_to_related_rule_chains_using_get(self, edge_id, **kwargs): # noqa: E501 + """findMissingToRelatedRuleChains # 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_missing_to_related_rule_chains_using_get(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (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_missing_to_related_rule_chains_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + else: + (data) = self.find_missing_to_related_rule_chains_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + return data + + def find_missing_to_related_rule_chains_using_get_with_http_info(self, edge_id, **kwargs): # noqa: E501 + """findMissingToRelatedRuleChains # 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_missing_to_related_rule_chains_using_get_with_http_info(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :return: str + 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 find_missing_to_related_rule_chains_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_missing_to_related_rule_chains_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/missingToRelatedRuleChains/{edgeId}', '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 get_customer_edges_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerEdges # noqa: 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_edges_using_get(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEdge + 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_edges_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_customer_edges_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_customer_edges_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 + """getCustomerEdges # noqa: 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_edges_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str customer_id: customerId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEdge + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_edges_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_edges_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_edges_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_edges_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'customer_id' in params: + path_params['customerId'] = params['customer_id'] # noqa: E501 + + query_params = [] + 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 + 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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/customer/{customerId}/edges{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEdge', # 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_by_id_using_get(self, edge_id, **kwargs): # noqa: E501 + """getEdgeById # noqa: 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_by_id_using_get(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :return: Edge + 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_by_id_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + else: + (data) = self.get_edge_by_id_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + return data + + def get_edge_by_id_using_get_with_http_info(self, edge_id, **kwargs): # noqa: E501 + """getEdgeById # noqa: 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_by_id_using_get_with_http_info(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :return: Edge + 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_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_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/{edgeId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Edge', # 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 + """getEdgeTypes # noqa: 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_types_using_get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[EntitySubtype] + 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_types_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_edge_types_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_edge_types_using_get_with_http_info(self, **kwargs): # noqa: E501 + """getEdgeTypes # noqa: 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_types_using_get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[EntitySubtype] + 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_edge_types_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/types', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntitySubtype]', # 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_edges_by_entity_group_id_using_get(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 + """getEdgesByEntityGroupId # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_edges_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: entityGroupId (required) + :param str page_size: Page size (required) + :param str page: Page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEdge + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_edges_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_edges_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_edges_by_entity_group_id_using_get_with_http_info(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 + """getEdgesByEntityGroupId # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_edges_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: entityGroupId (required) + :param str page_size: Page size (required) + :param str page: Page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEdge + 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_edges_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_edges_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_edges_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_edges_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 '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 '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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroup/{entityGroupId}/edges{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEdge', # 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_edges_by_ids_using_get(self, edge_ids, **kwargs): # noqa: E501 + """getEdgesByIds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_edges_by_ids_using_get(edge_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_ids: edgeIds (required) + :return: list[Edge] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_edges_by_ids_using_get_with_http_info(edge_ids, **kwargs) # noqa: E501 + else: + (data) = self.get_edges_by_ids_using_get_with_http_info(edge_ids, **kwargs) # noqa: E501 + return data + + def get_edges_by_ids_using_get_with_http_info(self, edge_ids, **kwargs): # noqa: E501 + """getEdgesByIds # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_edges_by_ids_using_get_with_http_info(edge_ids, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_ids: edgeIds (required) + :return: list[Edge] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_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_edges_by_ids_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'edge_ids' is set + if ('edge_ids' not in params or + params['edge_ids'] is None): + raise ValueError("Missing the required parameter `edge_ids` when calling `get_edges_by_ids_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'edge_ids' in params: + query_params.append(('edgeIds', params['edge_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edges{?edgeIds}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Edge]', # 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_edges_using_get(self, page_size, page, **kwargs): # noqa: E501 + """getEdges # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_edges_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEdge + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_edges_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_edges_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_edges_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getEdges # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_edges_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEdge + 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_edges_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_edges_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_edges_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + 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 '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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edges{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEdge', # 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_edge_using_get(self, edge_name, **kwargs): # noqa: E501 + """getTenantEdge # noqa: 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_edge_using_get(edge_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_name: edgeName (required) + :return: Edge + 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_edge_using_get_with_http_info(edge_name, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_edge_using_get_with_http_info(edge_name, **kwargs) # noqa: E501 + return data + + def get_tenant_edge_using_get_with_http_info(self, edge_name, **kwargs): # noqa: E501 + """getTenantEdge # noqa: 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_edge_using_get_with_http_info(edge_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_name: edgeName (required) + :return: Edge + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_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_tenant_edge_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'edge_name' is set + if ('edge_name' not in params or + params['edge_name'] is None): + raise ValueError("Missing the required parameter `edge_name` when calling `get_tenant_edge_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'edge_name' in params: + query_params.append(('edgeName', params['edge_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenant/edges{?edgeName}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Edge', # 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_edges_using_get(self, page_size, page, **kwargs): # noqa: E501 + """getTenantEdges # noqa: 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_edges_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEdge + 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_edges_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_edges_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_tenant_edges_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getTenantEdges # noqa: 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_edges_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEdge + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + 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_edges_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_tenant_edges_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_edges_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + 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 + 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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenant/edges{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEdge', # 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_edges_using_get(self, page_size, page, **kwargs): # noqa: E501 + """getUserEdges # noqa: 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_edges_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEdge + 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_edges_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_user_edges_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_user_edges_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getUserEdges # noqa: 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_edges_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) + :param str type: type + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEdge + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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') + 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_edges_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_edges_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_edges_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + 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 + 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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/edges{?type,textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEdge', # 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_edges_support_enabled_using_get(self, **kwargs): # noqa: E501 + """isEdgesSupportEnabled # 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_edges_support_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_edges_support_enabled_using_get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.is_edges_support_enabled_using_get_with_http_info(**kwargs) # noqa: E501 + return data + + def is_edges_support_enabled_using_get_with_http_info(self, **kwargs): # noqa: E501 + """isEdgesSupportEnabled # 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_edges_support_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_edges_support_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edges/enabled', '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_edge_using_post(self, body, **kwargs): # noqa: E501 + """saveEdge # 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Edge body: edge (required) + :param str entity_group_id: entityGroupId + :return: Edge + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_edge_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.save_edge_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def save_edge_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveEdge # 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Edge body: edge (required) + :param str entity_group_id: entityGroupId + :return: Edge + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'entity_group_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 save_edge_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_edge_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'entity_group_id' in params: + query_params.append(('entityGroupId', params['entity_group_id'])) # 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( + ['*/*']) # 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{?entityGroupId}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Edge', # 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_root_rule_chain_using_post(self, edge_id, rule_chain_id, **kwargs): # noqa: E501 + """setRootRuleChain # 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_root_rule_chain_using_post(edge_id, rule_chain_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str rule_chain_id: ruleChainId (required) + :return: Edge + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.set_root_rule_chain_using_post_with_http_info(edge_id, rule_chain_id, **kwargs) # noqa: E501 + else: + (data) = self.set_root_rule_chain_using_post_with_http_info(edge_id, rule_chain_id, **kwargs) # noqa: E501 + return data + + def set_root_rule_chain_using_post_with_http_info(self, edge_id, rule_chain_id, **kwargs): # noqa: E501 + """setRootRuleChain # 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_root_rule_chain_using_post_with_http_info(edge_id, rule_chain_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str rule_chain_id: ruleChainId (required) + :return: Edge + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_id', '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 set_root_rule_chain_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 `set_root_rule_chain_using_post`") # noqa: E501 + # 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 `set_root_rule_chain_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + 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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/{edgeId}/{ruleChainId}/root', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Edge', # 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 sync_edge_using_post(self, edge_id, **kwargs): # noqa: E501 + """syncEdge # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.sync_edge_using_post(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (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.sync_edge_using_post_with_http_info(edge_id, **kwargs) # noqa: E501 + else: + (data) = self.sync_edge_using_post_with_http_info(edge_id, **kwargs) # noqa: E501 + return data + + def sync_edge_using_post_with_http_info(self, edge_id, **kwargs): # noqa: E501 + """syncEdge # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.sync_edge_using_post_with_http_info(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :return: None + 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 sync_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 `sync_edge_using_post`") # 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 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/sync/{edgeId}', '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/edge_event_controller_api.py b/tb_rest_client/api/api_pe/edge_event_controller_api.py new file mode 100644 index 00000000..0b926d3e --- /dev/null +++ b/tb_rest_client/api/api_pe/edge_event_controller_api.py @@ -0,0 +1,162 @@ +# 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 +""" + +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 EdgeEventControllerApi(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_edge_events_using_get(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """getEdgeEvents # noqa: 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_events_using_get(edge_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :param int start_time: startTime + :param int end_time: endTime + :return: PageDataEdgeEvent + 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_events_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_edge_events_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_edge_events_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """getEdgeEvents # noqa: 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_events_using_get_with_http_info(edge_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :param int start_time: startTime + :param int end_time: endTime + :return: PageDataEdgeEvent + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_id', 'page_size', 'page', '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_edge_events_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_events_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_events_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_events_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + + query_params = [] + 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 + 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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/{edgeId}/events{?textSearch,sortProperty,sortOrder,startTime,endTime,pageSize,page}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataEdgeEvent', # 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 ae7e0f6f..7a7b5976 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class EntityGroupControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -34,48 +32,45 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def add_entities_to_entity_group_using_post(self, entity_group_id, str_entity_ids, **kwargs): # noqa: E501 + def add_entities_to_entity_group_using_post(self, body, entity_group_id, **kwargs): # noqa: E501 """addEntitiesToEntityGroup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.add_entities_to_entity_group_using_post(entity_group_id, str_entity_ids, async_req=True) + >>> thread = api.add_entities_to_entity_group_using_post(body, entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool + :param list[str] body: strEntityIds (required) :param str entity_group_id: entityGroupId (required) - :param list[str] str_entity_ids: strEntityIds (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.add_entities_to_entity_group_using_post_with_http_info(entity_group_id, str_entity_ids, - **kwargs) # noqa: E501 + return self.add_entities_to_entity_group_using_post_with_http_info(body, entity_group_id, **kwargs) # noqa: E501 else: - (data) = self.add_entities_to_entity_group_using_post_with_http_info(entity_group_id, str_entity_ids, - **kwargs) # noqa: E501 + (data) = self.add_entities_to_entity_group_using_post_with_http_info(body, entity_group_id, **kwargs) # noqa: E501 return data - def add_entities_to_entity_group_using_post_with_http_info(self, entity_group_id, str_entity_ids, - **kwargs): # noqa: E501 + def add_entities_to_entity_group_using_post_with_http_info(self, body, entity_group_id, **kwargs): # noqa: E501 """addEntitiesToEntityGroup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.add_entities_to_entity_group_using_post_with_http_info(entity_group_id, str_entity_ids, async_req=True) + >>> thread = api.add_entities_to_entity_group_using_post_with_http_info(body, entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool + :param list[str] body: strEntityIds (required) :param str entity_group_id: entityGroupId (required) - :param list[str] str_entity_ids: strEntityIds (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_group_id', 'str_entity_ids'] # noqa: E501 + all_params = ['body', 'entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -83,18 +78,21 @@ def add_entities_to_entity_group_using_post_with_http_info(self, entity_group_id 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 add_entities_to_entity_group_using_post" % key + ) params[key] = val del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `add_entities_to_entity_group_using_post`") # 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 `add_entities_to_entity_group_using_post`") # noqa: E501 - # verify the required parameter 'str_entity_ids' is set - if ('str_entity_ids' not in params or - params['str_entity_ids'] is None): - raise ValueError( - "Missing the required parameter `str_entity_ids` when calling `add_entities_to_entity_group_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_group_id` when calling `add_entities_to_entity_group_using_post`") # noqa: E501 collection_formats = {} @@ -110,12 +108,8 @@ def add_entities_to_entity_group_using_post_with_http_info(self, entity_group_id local_var_files = {} body_params = None - if 'str_entity_ids' in params: - body_params = params['str_entity_ids'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -139,12 +133,121 @@ def add_entities_to_entity_group_using_post_with_http_info(self, entity_group_id _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def assign_entity_group_to_edge_using_post(self, edge_id, group_type, entity_group_id, **kwargs): # noqa: E501 + """assignEntityGroupToEdge # 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_entity_group_to_edge_using_post(edge_id, group_type, entity_group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str group_type: EntityGroup type (required) + :param str entity_group_id: entityGroupId (required) + :return: EntityGroup + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.assign_entity_group_to_edge_using_post_with_http_info(edge_id, group_type, entity_group_id, **kwargs) # noqa: E501 + else: + (data) = self.assign_entity_group_to_edge_using_post_with_http_info(edge_id, group_type, entity_group_id, **kwargs) # noqa: E501 + return data + + def assign_entity_group_to_edge_using_post_with_http_info(self, edge_id, group_type, entity_group_id, **kwargs): # noqa: E501 + """assignEntityGroupToEdge # 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_entity_group_to_edge_using_post_with_http_info(edge_id, group_type, entity_group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str group_type: EntityGroup type (required) + :param str entity_group_id: entityGroupId (required) + :return: EntityGroup + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_id', 'group_type', 'entity_group_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_entity_group_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 `assign_entity_group_to_edge_using_post`") # 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 `assign_entity_group_to_edge_using_post`") # 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 `assign_entity_group_to_edge_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + if 'group_type' in params: + path_params['groupType'] = params['group_type'] # noqa: E501 + if 'entity_group_id' in params: + path_params['entityGroupId'] = params['entity_group_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EntityGroup', # 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_entity_group_using_delete(self, entity_group_id, **kwargs): # noqa: E501 """deleteEntityGroup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_entity_group_using_delete(entity_group_id, async_req=True) + >>> thread = api.delete_entity_group_using_delete(entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -165,7 +268,7 @@ def delete_entity_group_using_delete_with_http_info(self, entity_group_id, **kwa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_entity_group_using_delete_with_http_info(entity_group_id, async_req=True) + >>> thread = api.delete_entity_group_using_delete_with_http_info(entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -183,13 +286,17 @@ def delete_entity_group_using_delete_with_http_info(self, entity_group_id, **kwa 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_entity_group_using_delete" % 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 `delete_entity_group_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_group_id` when calling `delete_entity_group_using_delete`") # noqa: E501 collection_formats = {} @@ -204,27 +311,120 @@ def delete_entity_group_using_delete_with_http_info(self, entity_group_id, **kwa form_params = [] local_var_files = {} + body_params = None + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroup/{entityGroupId}', '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_all_edge_entity_groups_using_get(self, edge_id, group_type, **kwargs): # noqa: E501 + """getAllEdgeEntityGroups # noqa: 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_entity_groups_using_get(edge_id, group_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str group_type: EntityGroup 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_all_edge_entity_groups_using_get_with_http_info(edge_id, group_type, **kwargs) # noqa: E501 + else: + (data) = self.get_all_edge_entity_groups_using_get_with_http_info(edge_id, group_type, **kwargs) # noqa: E501 + return data + + def get_all_edge_entity_groups_using_get_with_http_info(self, edge_id, group_type, **kwargs): # noqa: E501 + """getAllEdgeEntityGroups # noqa: 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_entity_groups_using_get_with_http_info(edge_id, group_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str group_type: EntityGroup type (required) + :return: list[EntityGroupInfo] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_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_all_edge_entity_groups_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_all_edge_entity_groups_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_all_edge_entity_groups_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_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( ['*/*']) # 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/entityGroup/{entityGroupId}', 'DELETE', + '/api/allEntityGroups/edge/{edgeId}/{groupType}', '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='list[EntityGroupInfo]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -232,55 +432,55 @@ def delete_entity_group_using_delete_with_http_info(self, entity_group_id, **kwa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_enitity_group_by_owner_and_name_and_type_using_get(self, owner_type, owner_id, group_type, group_name, - **kwargs): # noqa: E501 - """getEnitityGroupByOwnerAndNameAndType # noqa: E501 + def get_edge_entity_groups_using_get(self, edge_id, group_type, page_size, page, **kwargs): # noqa: E501 + """getEdgeEntityGroups # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_enitity_group_by_owner_and_name_and_type_using_get(owner_type, owner_id, group_type, group_name, async_req=True) + >>> thread = api.get_edge_entity_groups_using_get(edge_id, group_type, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str owner_type: ownerType (required) - :param str owner_id: ownerId (required) + :param str edge_id: edgeId (required) :param str group_type: EntityGroup type (required) - :param str group_name: groupName (required) - :return: EntityGroupInfo + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :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_enitity_group_by_owner_and_name_and_type_using_get_with_http_info(owner_type, owner_id, - group_type, group_name, - **kwargs) # noqa: E501 + return self.get_edge_entity_groups_using_get_with_http_info(edge_id, group_type, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_enitity_group_by_owner_and_name_and_type_using_get_with_http_info(owner_type, owner_id, - group_type, group_name, - **kwargs) # noqa: E501 + (data) = self.get_edge_entity_groups_using_get_with_http_info(edge_id, group_type, page_size, page, **kwargs) # noqa: E501 return data - def get_enitity_group_by_owner_and_name_and_type_using_get_with_http_info(self, owner_type, owner_id, group_type, - group_name, **kwargs): # noqa: E501 - """getEnitityGroupByOwnerAndNameAndType # noqa: E501 + def get_edge_entity_groups_using_get_with_http_info(self, edge_id, group_type, page_size, page, **kwargs): # noqa: E501 + """getEdgeEntityGroups # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_enitity_group_by_owner_and_name_and_type_using_get_with_http_info(owner_type, owner_id, group_type, group_name, async_req=True) + >>> thread = api.get_edge_entity_groups_using_get_with_http_info(edge_id, group_type, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool - :param str owner_type: ownerType (required) - :param str owner_id: ownerId (required) + :param str edge_id: edgeId (required) :param str group_type: EntityGroup type (required) - :param str group_name: groupName (required) - :return: EntityGroupInfo + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataEntityGroupInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['owner_type', 'owner_id', 'group_type', 'group_name'] # 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') @@ -288,42 +488,49 @@ def get_enitity_group_by_owner_and_name_and_type_using_get_with_http_info(self, 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_entity_groups_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_enitity_group_by_owner_and_name_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_enitity_group_by_owner_and_name_and_type_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_entity_groups_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_enitity_group_by_owner_and_name_and_type_using_get`") # noqa: E501 - # verify the required parameter 'group_name' is set - if ('group_name' not in params or - params['group_name'] is None): - raise ValueError( - "Missing the required parameter `group_name` when calling `get_enitity_group_by_owner_and_name_and_type_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `group_type` when calling `get_edge_entity_groups_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_entity_groups_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_entity_groups_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 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 if 'group_type' in params: path_params['groupType'] = params['group_type'] # noqa: E501 - if 'group_name' in params: - path_params['groupName'] = params['group_name'] # noqa: E501 query_params = [] + 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 '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 = {} @@ -335,22 +542,18 @@ def get_enitity_group_by_owner_and_name_and_type_using_get_with_http_info(self, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}', 'GET', + '/api/entityGroups/edge/{edgeId}/{groupType}{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='EntityGroupInfo', # noqa: E501 + 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'), @@ -363,7 +566,7 @@ def get_entities_using_get(self, entity_group_id, page_size, page, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entities_using_get(entity_group_id, page_size, page, async_req=True) + >>> thread = api.get_entities_using_get(entity_group_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -381,8 +584,7 @@ def get_entities_using_get(self, entity_group_id, page_size, page, **kwargs): # if kwargs.get('async_req'): return self.get_entities_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 else: - (data) = self.get_entities_using_get_with_http_info(entity_group_id, page_size, page, - **kwargs) # noqa: E501 + (data) = self.get_entities_using_get_with_http_info(entity_group_id, page_size, page, **kwargs) # noqa: E501 return data def get_entities_using_get_with_http_info(self, entity_group_id, page_size, page, **kwargs): # noqa: E501 @@ -390,7 +592,7 @@ def get_entities_using_get_with_http_info(self, entity_group_id, page_size, page This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entities_using_get_with_http_info(entity_group_id, page_size, page, async_req=True) + >>> thread = api.get_entities_using_get_with_http_info(entity_group_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -405,8 +607,7 @@ def get_entities_using_get_with_http_info(self, entity_group_id, page_size, page returns the request thread. """ - all_params = ['entity_group_id', 'page_size', 'page', 'text_search', 'sort_property', - 'sort_order'] # noqa: E501 + 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') @@ -414,30 +615,26 @@ def get_entities_using_get_with_http_info(self, entity_group_id, page_size, page 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_entities_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_entities_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_group_id` when calling `get_entities_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_entities_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_entities_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_entities_using_get`") # noqa: E501 - - if 'page_size' in params and params['page_size'] < 1.0: # noqa: E501 - raise ValueError( - "Invalid value for parameter `page_size` when calling `get_entities_using_get`, must be a value greater than or equal to `1.0`") # noqa: E501 - if 'page' in params and params['page'] < 0.0: # noqa: E501 - raise ValueError( - "Invalid value for parameter `page` when calling `get_entities_using_get`, must be a value greater than or equal to `0.0`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_entities_using_get`") # noqa: E501 + collection_formats = {} path_params = {} @@ -466,10 +663,6 @@ def get_entities_using_get_with_http_info(self, entity_group_id, page_size, page header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -489,13 +682,12 @@ def get_entities_using_get_with_http_info(self, entity_group_id, page_size, page _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_entity_group_all_by_owner_and_type_using_get(self, owner_type, owner_id, group_type, - **kwargs): # noqa: E501 + def get_entity_group_all_by_owner_and_type_using_get(self, owner_type, owner_id, group_type, **kwargs): # noqa: E501 """getEntityGroupAllByOwnerAndType # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_group_all_by_owner_and_type_using_get(owner_type, owner_id, group_type, async_req=True) + >>> thread = api.get_entity_group_all_by_owner_and_type_using_get(owner_type, owner_id, group_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -508,22 +700,17 @@ def get_entity_group_all_by_owner_and_type_using_get(self, owner_type, owner_id, """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_entity_group_all_by_owner_and_type_using_get_with_http_info(owner_type, owner_id, - group_type, - **kwargs) # noqa: E501 + return self.get_entity_group_all_by_owner_and_type_using_get_with_http_info(owner_type, owner_id, group_type, **kwargs) # noqa: E501 else: - (data) = self.get_entity_group_all_by_owner_and_type_using_get_with_http_info(owner_type, owner_id, - group_type, - **kwargs) # noqa: E501 + (data) = self.get_entity_group_all_by_owner_and_type_using_get_with_http_info(owner_type, owner_id, group_type, **kwargs) # noqa: E501 return data - def get_entity_group_all_by_owner_and_type_using_get_with_http_info(self, owner_type, owner_id, group_type, - **kwargs): # noqa: E501 + def get_entity_group_all_by_owner_and_type_using_get_with_http_info(self, owner_type, owner_id, group_type, **kwargs): # noqa: E501 """getEntityGroupAllByOwnerAndType # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_group_all_by_owner_and_type_using_get_with_http_info(owner_type, owner_id, group_type, async_req=True) + >>> thread = api.get_entity_group_all_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 @@ -543,23 +730,25 @@ def get_entity_group_all_by_owner_and_type_using_get_with_http_info(self, owner_ 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_group_all_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_group_all_by_owner_and_type_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `owner_type` when calling `get_entity_group_all_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_group_all_by_owner_and_type_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `owner_id` when calling `get_entity_group_all_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_group_all_by_owner_and_type_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `group_type` when calling `get_entity_group_all_by_owner_and_type_using_get`") # noqa: E501 collection_formats = {} @@ -583,10 +772,6 @@ def get_entity_group_all_by_owner_and_type_using_get_with_http_info(self, owner_ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -611,7 +796,7 @@ def get_entity_group_by_id_using_get(self, entity_group_id, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_group_by_id_using_get(entity_group_id, async_req=True) + >>> thread = api.get_entity_group_by_id_using_get(entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -632,7 +817,7 @@ def get_entity_group_by_id_using_get_with_http_info(self, entity_group_id, **kwa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_group_by_id_using_get_with_http_info(entity_group_id, async_req=True) + >>> thread = api.get_entity_group_by_id_using_get_with_http_info(entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -650,13 +835,17 @@ def get_entity_group_by_id_using_get_with_http_info(self, entity_group_id, **kwa 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_group_by_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_entity_group_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_group_id` when calling `get_entity_group_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -676,10 +865,6 @@ def get_entity_group_by_id_using_get_with_http_info(self, entity_group_id, **kwa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -699,12 +884,129 @@ def get_entity_group_by_id_using_get_with_http_info(self, entity_group_id, **kwa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_entity_group_by_owner_and_name_and_type_using_get(self, owner_type, owner_id, group_type, group_name, **kwargs): # noqa: E501 + """getEntityGroupByOwnerAndNameAndType # noqa: 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_group_by_owner_and_name_and_type_using_get(owner_type, owner_id, group_type, group_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner_type: ownerType (required) + :param str owner_id: ownerId (required) + :param str group_type: EntityGroup type (required) + :param str group_name: groupName (required) + :return: 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_group_by_owner_and_name_and_type_using_get_with_http_info(owner_type, owner_id, group_type, group_name, **kwargs) # noqa: E501 + else: + (data) = self.get_entity_group_by_owner_and_name_and_type_using_get_with_http_info(owner_type, owner_id, group_type, group_name, **kwargs) # noqa: E501 + return data + + def get_entity_group_by_owner_and_name_and_type_using_get_with_http_info(self, owner_type, owner_id, group_type, group_name, **kwargs): # noqa: E501 + """getEntityGroupByOwnerAndNameAndType # noqa: 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_group_by_owner_and_name_and_type_using_get_with_http_info(owner_type, owner_id, group_type, group_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner_type: ownerType (required) + :param str owner_id: ownerId (required) + :param str group_type: EntityGroup type (required) + :param str group_name: groupName (required) + :return: EntityGroupInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner_type', 'owner_id', 'group_type', 'group_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_entity_group_by_owner_and_name_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_group_by_owner_and_name_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_group_by_owner_and_name_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_group_by_owner_and_name_and_type_using_get`") # noqa: E501 + # verify the required parameter 'group_name' is set + if ('group_name' not in params or + params['group_name'] is None): + raise ValueError("Missing the required parameter `group_name` when calling `get_entity_group_by_owner_and_name_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 + if 'group_name' in params: + path_params['groupName'] = params['group_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='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_ids_using_get(self, entity_group_ids, **kwargs): # noqa: E501 """getEntityGroupsByIds # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_groups_by_ids_using_get(entity_group_ids, 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 @@ -725,7 +1027,7 @@ def get_entity_groups_by_ids_using_get_with_http_info(self, entity_group_ids, ** This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_groups_by_ids_using_get_with_http_info(entity_group_ids, 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 @@ -743,13 +1045,17 @@ def get_entity_groups_by_ids_using_get_with_http_info(self, entity_group_ids, ** 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 + raise ValueError("Missing the required parameter `entity_group_ids` when calling `get_entity_groups_by_ids_using_get`") # noqa: E501 collection_formats = {} @@ -769,10 +1075,6 @@ def get_entity_groups_by_ids_using_get_with_http_info(self, entity_group_ids, ** header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -797,7 +1099,7 @@ def get_entity_groups_by_owner_and_type_using_get(self, owner_type, owner_id, gr This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_groups_by_owner_and_type_using_get(owner_type, owner_id, group_type, 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 @@ -810,20 +1112,17 @@ def get_entity_groups_by_owner_and_type_using_get(self, owner_type, owner_id, gr """ 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_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 + (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 + def get_entity_groups_by_owner_and_type_using_get_with_http_info(self, owner_type, owner_id, group_type, **kwargs): # noqa: E501 """getEntityGroupsByOwnerAndType # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.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_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 @@ -843,23 +1142,25 @@ def get_entity_groups_by_owner_and_type_using_get_with_http_info(self, owner_typ 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 + 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 + 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 + raise ValueError("Missing the required parameter `group_type` when calling `get_entity_groups_by_owner_and_type_using_get`") # noqa: E501 collection_formats = {} @@ -883,10 +1184,6 @@ def get_entity_groups_by_owner_and_type_using_get_with_http_info(self, owner_typ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -911,7 +1208,7 @@ def get_entity_groups_by_type_using_get(self, group_type, **kwargs): # noqa: E5 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_groups_by_type_using_get(group_type, async_req=True) + >>> thread = api.get_entity_groups_by_type_using_get(group_type, async_req=True) >>> result = thread.get() :param async_req bool @@ -932,7 +1229,7 @@ def get_entity_groups_by_type_using_get_with_http_info(self, group_type, **kwarg This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_groups_by_type_using_get_with_http_info(group_type, 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 @@ -950,13 +1247,17 @@ def get_entity_groups_by_type_using_get_with_http_info(self, group_type, **kwarg 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 + raise ValueError("Missing the required parameter `group_type` when calling `get_entity_groups_by_type_using_get`") # noqa: E501 collection_formats = {} @@ -976,10 +1277,6 @@ def get_entity_groups_by_type_using_get_with_http_info(self, group_type, **kwarg header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1004,7 +1301,7 @@ def get_entity_groups_for_entity_using_get(self, entity_type, entity_id, **kwarg This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_groups_for_entity_using_get(entity_type, entity_id, 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 @@ -1016,11 +1313,9 @@ def get_entity_groups_for_entity_using_get(self, entity_type, entity_id, **kwarg """ 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_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 + (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 @@ -1028,7 +1323,7 @@ def get_entity_groups_for_entity_using_get_with_http_info(self, entity_type, ent This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_groups_for_entity_using_get_with_http_info(entity_type, entity_id, 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 @@ -1047,18 +1342,21 @@ def get_entity_groups_for_entity_using_get_with_http_info(self, entity_type, ent 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 + 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 + raise ValueError("Missing the required parameter `entity_id` when calling `get_entity_groups_for_entity_using_get`") # noqa: E501 collection_formats = {} @@ -1080,10 +1378,6 @@ def get_entity_groups_for_entity_using_get_with_http_info(self, entity_type, ent header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1108,7 +1402,7 @@ def get_group_entity_using_get(self, entity_group_id, entity_id, **kwargs): # n This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_group_entity_using_get(entity_group_id, entity_id, 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 @@ -1130,7 +1424,7 @@ def get_group_entity_using_get_with_http_info(self, entity_group_id, entity_id, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_group_entity_using_get_with_http_info(entity_group_id, entity_id, 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 @@ -1149,18 +1443,21 @@ def get_group_entity_using_get_with_http_info(self, entity_group_id, entity_id, 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 + 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 + raise ValueError("Missing the required parameter `entity_id` when calling `get_group_entity_using_get`") # noqa: E501 collection_formats = {} @@ -1182,10 +1479,6 @@ def get_group_entity_using_get_with_http_info(self, entity_group_id, entity_id, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1210,7 +1503,7 @@ def get_owners_using_get(self, page_size, page, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_owners_using_get(page_size, page, async_req=True) + >>> thread = api.get_owners_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -1235,7 +1528,7 @@ def get_owners_using_get_with_http_info(self, page_size, page, **kwargs): # noq This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_owners_using_get_with_http_info(page_size, page, 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 @@ -1257,13 +1550,17 @@ def get_owners_using_get_with_http_info(self, page_size, page, **kwargs): # noq 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 + 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): @@ -1295,10 +1592,6 @@ def get_owners_using_get_with_http_info(self, page_size, page, **kwargs): # noq header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -1323,7 +1616,7 @@ def make_entity_group_private_using_post(self, entity_group_id, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.make_entity_group_private_using_post(entity_group_id, async_req=True) + >>> thread = api.make_entity_group_private_using_post(entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -1344,7 +1637,7 @@ def make_entity_group_private_using_post_with_http_info(self, entity_group_id, * This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.make_entity_group_private_using_post_with_http_info(entity_group_id, async_req=True) + >>> thread = api.make_entity_group_private_using_post_with_http_info(entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -1362,13 +1655,17 @@ def make_entity_group_private_using_post_with_http_info(self, entity_group_id, * 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 make_entity_group_private_using_post" % 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 `make_entity_group_private_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_group_id` when calling `make_entity_group_private_using_post`") # noqa: E501 collection_formats = {} @@ -1384,14 +1681,6 @@ def make_entity_group_private_using_post_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( - ['*/*']) # 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 @@ -1416,7 +1705,7 @@ def make_entity_group_public_using_post(self, entity_group_id, **kwargs): # noq This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.make_entity_group_public_using_post(entity_group_id, async_req=True) + >>> thread = api.make_entity_group_public_using_post(entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -1437,7 +1726,7 @@ def make_entity_group_public_using_post_with_http_info(self, entity_group_id, ** This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.make_entity_group_public_using_post_with_http_info(entity_group_id, async_req=True) + >>> thread = api.make_entity_group_public_using_post_with_http_info(entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -1455,13 +1744,17 @@ def make_entity_group_public_using_post_with_http_info(self, entity_group_id, ** 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 make_entity_group_public_using_post" % 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 `make_entity_group_public_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_group_id` when calling `make_entity_group_public_using_post`") # noqa: E501 collection_formats = {} @@ -1477,14 +1770,6 @@ def make_entity_group_public_using_post_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( - ['*/*']) # 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 @@ -1504,48 +1789,45 @@ def make_entity_group_public_using_post_with_http_info(self, entity_group_id, ** _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def remove_entities_from_entity_group_using_post(self, entity_group_id, str_entity_ids, **kwargs): # noqa: E501 + def remove_entities_from_entity_group_using_post(self, body, entity_group_id, **kwargs): # noqa: E501 """removeEntitiesFromEntityGroup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.remove_entities_from_entity_group_using_post(entity_group_id, str_entity_ids, async_req=True) + >>> thread = api.remove_entities_from_entity_group_using_post(body, entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool + :param list[str] body: strEntityIds (required) :param str entity_group_id: entityGroupId (required) - :param list[str] str_entity_ids: strEntityIds (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.remove_entities_from_entity_group_using_post_with_http_info(entity_group_id, str_entity_ids, - **kwargs) # noqa: E501 + return self.remove_entities_from_entity_group_using_post_with_http_info(body, entity_group_id, **kwargs) # noqa: E501 else: - (data) = self.remove_entities_from_entity_group_using_post_with_http_info(entity_group_id, str_entity_ids, - **kwargs) # noqa: E501 + (data) = self.remove_entities_from_entity_group_using_post_with_http_info(body, entity_group_id, **kwargs) # noqa: E501 return data - def remove_entities_from_entity_group_using_post_with_http_info(self, entity_group_id, str_entity_ids, - **kwargs): # noqa: E501 + def remove_entities_from_entity_group_using_post_with_http_info(self, body, entity_group_id, **kwargs): # noqa: E501 """removeEntitiesFromEntityGroup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.remove_entities_from_entity_group_using_post_with_http_info(entity_group_id, str_entity_ids, async_req=True) + >>> thread = api.remove_entities_from_entity_group_using_post_with_http_info(body, entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool + :param list[str] body: strEntityIds (required) :param str entity_group_id: entityGroupId (required) - :param list[str] str_entity_ids: strEntityIds (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_group_id', 'str_entity_ids'] # noqa: E501 + all_params = ['body', 'entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1553,18 +1835,21 @@ def remove_entities_from_entity_group_using_post_with_http_info(self, entity_gro 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 remove_entities_from_entity_group_using_post" % key + ) params[key] = val del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `remove_entities_from_entity_group_using_post`") # 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 `remove_entities_from_entity_group_using_post`") # noqa: E501 - # verify the required parameter 'str_entity_ids' is set - if ('str_entity_ids' not in params or - params['str_entity_ids'] is None): - raise ValueError( - "Missing the required parameter `str_entity_ids` when calling `remove_entities_from_entity_group_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_group_id` when calling `remove_entities_from_entity_group_using_post`") # noqa: E501 collection_formats = {} @@ -1580,12 +1865,8 @@ def remove_entities_from_entity_group_using_post_with_http_info(self, entity_gro local_var_files = {} body_params = None - if 'str_entity_ids' in params: - body_params = params['str_entity_ids'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - + 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 @@ -1609,43 +1890,43 @@ def remove_entities_from_entity_group_using_post_with_http_info(self, entity_gro _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_entity_group_using_post(self, entity_group, **kwargs): # noqa: E501 + def save_entity_group_using_post(self, body, **kwargs): # noqa: E501 """saveEntityGroup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_group_using_post(entity_group, async_req=True) + >>> thread = api.save_entity_group_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EntityGroup entity_group: entityGroup (required) + :param EntityGroup body: entityGroup (required) :return: EntityGroupInfo If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_entity_group_using_post_with_http_info(entity_group, **kwargs) # noqa: E501 + return self.save_entity_group_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_entity_group_using_post_with_http_info(entity_group, **kwargs) # noqa: E501 + (data) = self.save_entity_group_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_entity_group_using_post_with_http_info(self, entity_group, **kwargs): # noqa: E501 + def save_entity_group_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveEntityGroup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_group_using_post_with_http_info(entity_group, async_req=True) + >>> thread = api.save_entity_group_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EntityGroup entity_group: entityGroup (required) + :param EntityGroup body: entityGroup (required) :return: EntityGroupInfo If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_group'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1653,13 +1934,17 @@ def save_entity_group_using_post_with_http_info(self, entity_group, **kwargs): 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_entity_group_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'entity_group' is set - if ('entity_group' not in params or - params['entity_group'] is None): - raise ValueError( - "Missing the required parameter `entity_group` when calling `save_entity_group_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_entity_group_using_post`") # noqa: E501 collection_formats = {} @@ -1673,8 +1958,8 @@ def save_entity_group_using_post_with_http_info(self, entity_group, **kwargs): local_var_files = {} body_params = None - if 'entity_group' in params: - body_params = params['entity_group'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -1702,13 +1987,12 @@ def save_entity_group_using_post_with_http_info(self, entity_group, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def share_entity_group_to_child_owner_user_group_using_post(self, entity_group_id, user_group_id, role_id, - **kwargs): # noqa: E501 + def share_entity_group_to_child_owner_user_group_using_post(self, entity_group_id, user_group_id, role_id, **kwargs): # noqa: E501 """shareEntityGroupToChildOwnerUserGroup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.share_entity_group_to_child_owner_user_group_using_post(entity_group_id, user_group_id, role_id, async_req=True) + >>> thread = api.share_entity_group_to_child_owner_user_group_using_post(entity_group_id, user_group_id, role_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -1721,22 +2005,17 @@ def share_entity_group_to_child_owner_user_group_using_post(self, entity_group_i """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.share_entity_group_to_child_owner_user_group_using_post_with_http_info(entity_group_id, - user_group_id, role_id, - **kwargs) # noqa: E501 + return self.share_entity_group_to_child_owner_user_group_using_post_with_http_info(entity_group_id, user_group_id, role_id, **kwargs) # noqa: E501 else: - (data) = self.share_entity_group_to_child_owner_user_group_using_post_with_http_info(entity_group_id, - user_group_id, role_id, - **kwargs) # noqa: E501 + (data) = self.share_entity_group_to_child_owner_user_group_using_post_with_http_info(entity_group_id, user_group_id, role_id, **kwargs) # noqa: E501 return data - def share_entity_group_to_child_owner_user_group_using_post_with_http_info(self, entity_group_id, user_group_id, - role_id, **kwargs): # noqa: E501 + def share_entity_group_to_child_owner_user_group_using_post_with_http_info(self, entity_group_id, user_group_id, role_id, **kwargs): # noqa: E501 """shareEntityGroupToChildOwnerUserGroup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.share_entity_group_to_child_owner_user_group_using_post_with_http_info(entity_group_id, user_group_id, role_id, async_req=True) + >>> thread = api.share_entity_group_to_child_owner_user_group_using_post_with_http_info(entity_group_id, user_group_id, role_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -1756,23 +2035,25 @@ def share_entity_group_to_child_owner_user_group_using_post_with_http_info(self, 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 share_entity_group_to_child_owner_user_group_using_post" % 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 `share_entity_group_to_child_owner_user_group_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `entity_group_id` when calling `share_entity_group_to_child_owner_user_group_using_post`") # noqa: E501 # verify the required parameter 'user_group_id' is set if ('user_group_id' not in params or params['user_group_id'] is None): - raise ValueError( - "Missing the required parameter `user_group_id` when calling `share_entity_group_to_child_owner_user_group_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `user_group_id` when calling `share_entity_group_to_child_owner_user_group_using_post`") # noqa: E501 # verify the required parameter 'role_id' is set if ('role_id' not in params or params['role_id'] is None): - raise ValueError( - "Missing the required parameter `role_id` when calling `share_entity_group_to_child_owner_user_group_using_post`") # noqa: E501 + raise ValueError("Missing the required parameter `role_id` when calling `share_entity_group_to_child_owner_user_group_using_post`") # noqa: E501 collection_formats = {} @@ -1792,10 +2073,103 @@ def share_entity_group_to_child_owner_user_group_using_post_with_http_info(self, local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share', '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 share_entity_group_using_post(self, body, entity_group_id, **kwargs): # noqa: E501 + """shareEntityGroup # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.share_entity_group_using_post(body, entity_group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ShareGroupRequest body: shareGroupRequest (required) + :param str entity_group_id: entityGroupId (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.share_entity_group_using_post_with_http_info(body, entity_group_id, **kwargs) # noqa: E501 + else: + (data) = self.share_entity_group_using_post_with_http_info(body, entity_group_id, **kwargs) # noqa: E501 + return data + + def share_entity_group_using_post_with_http_info(self, body, entity_group_id, **kwargs): # noqa: E501 + """shareEntityGroup # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.share_entity_group_using_post_with_http_info(body, entity_group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ShareGroupRequest body: shareGroupRequest (required) + :param str entity_group_id: entityGroupId (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'entity_group_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 share_entity_group_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `share_entity_group_using_post`") # 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 `share_entity_group_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'entity_group_id' in params: + path_params['entityGroupId'] = params['entity_group_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 `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -1804,7 +2178,7 @@ def share_entity_group_to_child_owner_user_group_using_post_with_http_info(self, auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share', 'POST', + '/api/entityGroup/{entityGroupId}/share', 'POST', path_params, query_params, header_params, @@ -1819,56 +2193,47 @@ def share_entity_group_to_child_owner_user_group_using_post_with_http_info(self, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_entity_group_by_owner_and_name_and_type_using_get(self, owner_type, owner_id, group_type, group_name, - **kwargs): - """getEntityGroupByOwnerAndNameAndType # noqa: E501 + def unassign_entity_group_from_edge_using_delete(self, edge_id, group_type, entity_group_id, **kwargs): # noqa: E501 + """unassignEntityGroupFromEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_group_by_owner_and_name_and_type_using_get(owner_type, owner_id, group_type, group_name, async_req=True) + >>> thread = api.unassign_entity_group_from_edge_using_delete(edge_id, group_type, entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str owner_type: ownerType (required) - :param str owner_id: ownerId (required) - :param str group_type: groupType (required) - :param str group_name: groupName (required) + :param str edge_id: edgeId (required) + :param str group_type: EntityGroup type (required) + :param str entity_group_id: entityGroupId (required) :return: EntityGroup 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_group_by_owner_and_name_and_type_using_get_with_http_info(owner_type, owner_id, - group_type, group_name, - **kwargs) # noqa: E501 + return self.unassign_entity_group_from_edge_using_delete_with_http_info(edge_id, group_type, entity_group_id, **kwargs) # noqa: E501 else: - (data) = self.get_entity_group_by_owner_and_name_and_type_using_get_with_http_info(owner_type, owner_id, - group_type, group_name, - **kwargs) # noqa: E501 + (data) = self.unassign_entity_group_from_edge_using_delete_with_http_info(edge_id, group_type, entity_group_id, **kwargs) # noqa: E501 return data - def get_entity_group_by_owner_and_name_and_type_using_get_with_http_info(self, owner_type, owner_id, group_type, - group_name, **kwargs): - """getEntityGroupByOwnerAndNameAndType # noqa: E501 + def unassign_entity_group_from_edge_using_delete_with_http_info(self, edge_id, group_type, entity_group_id, **kwargs): # noqa: E501 + """unassignEntityGroupFromEdge # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_group_by_owner_and_name_and_type_using_get_with_http_info(owner_type, owner_id, group_type, group_name, async_req=True) + >>> thread = api.unassign_entity_group_from_edge_using_delete_with_http_info(edge_id, group_type, entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str owner_type: ownerType (required) - :param str owner_id: ownerId (required) - :param str group_type: groupType (required) - :param str group_name: groupName (required) + :param str edge_id: edgeId (required) + :param str group_type: EntityGroup type (required) + :param str entity_group_id: entityGroupId (required) :return: EntityGroup If the method is called asynchronously, returns the request thread. """ - all_params = ['owner_type', 'owner_id', 'group_type', 'group_name'] # noqa: E501 + all_params = ['edge_id', 'group_type', 'entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1876,43 +2241,35 @@ def get_entity_group_by_owner_and_name_and_type_using_get_with_http_info(self, o 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_entity_group_from_edge_using_delete" % 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_by_owner_and_name_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_group_by_owner_and_name_and_type_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 `unassign_entity_group_from_edge_using_delete`") # 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_by_owner_and_name_and_type_using_get`") # noqa: E501 - if params['group_type'] in ['CUSTOMER', 'ASSET', 'DEVICE', 'USER', 'ENTITY_VIEW', 'DASHBOARD']: - raise ValueError( - "The required parameter `group_type` only can be one of ['CUSTOMER', 'ASSET', 'DEVICE', 'USER', 'ENTITY_VIEW', 'DASHBOARD']") # noqa: E501 - # verify the required parameter 'group_name' is set - if ('group_name' not in params or - params['group_name'] is None): - raise ValueError( - "Missing the required parameter `group_name` when calling `get_entity_group_by_owner_and_name_and_type_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `group_type` when calling `unassign_entity_group_from_edge_using_delete`") # 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 `unassign_entity_group_from_edge_using_delete`") # 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 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 if 'group_type' in params: path_params['groupType'] = params['group_type'] # noqa: E501 - if 'group_name' in params: - path_params['groupName'] = params['group_name'] # noqa: E501 + if 'entity_group_id' in params: + path_params['entityGroupId'] = params['entity_group_id'] # noqa: E501 query_params = [] @@ -1926,15 +2283,11 @@ def get_entity_group_by_owner_and_name_and_type_using_get_with_http_info(self, o header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}', 'GET', + '/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}', 'DELETE', path_params, query_params, header_params, 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 77663e5f..4e3001fc 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -21,23 +17,213 @@ # python 2 and python 3 compatibility library import six -from tb_rest_client.api.api_ce import EntityViewControllerApi +from tb_rest_client.api_client import ApiClient -class EntityViewControllerApi(EntityViewControllerApi): +class EntityViewControllerApi(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): - super().__init__(api_client) + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_entity_view_using_delete(self, entity_view_id, **kwargs): # noqa: E501 + """deleteEntityView # 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_entity_view_using_delete(entity_view_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_view_id: entityViewId (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_entity_view_using_delete_with_http_info(entity_view_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_entity_view_using_delete_with_http_info(entity_view_id, **kwargs) # noqa: E501 + return data + + def delete_entity_view_using_delete_with_http_info(self, entity_view_id, **kwargs): # noqa: E501 + """deleteEntityView # 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_entity_view_using_delete_with_http_info(entity_view_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_view_id: entityViewId (required) + :return: None + 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 delete_entity_view_using_delete" % 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 `delete_entity_view_using_delete`") # 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 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/entityView/{entityViewId}', '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 find_by_query_using_post4(self, body, **kwargs): # noqa: E501 + """findByQuery # 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_by_query_using_post4(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param EntityViewSearchQuery body: query (required) + :return: list[EntityView] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find_by_query_using_post4_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.find_by_query_using_post4_with_http_info(body, **kwargs) # noqa: E501 + return data + + def find_by_query_using_post4_with_http_info(self, body, **kwargs): # noqa: E501 + """findByQuery # 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_by_query_using_post4_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param EntityViewSearchQuery body: query (required) + :return: list[EntityView] + 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 find_by_query_using_post4" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `find_by_query_using_post4`") # noqa: E501 + + 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( + ['*/*']) # 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/entityViews', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntityView]', # 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 """getCustomerEntityViews # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_entity_views_using_get(customer_id, page_size, page, async_req=True) + >>> thread = api.get_customer_entity_views_using_get(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -64,7 +250,7 @@ def get_customer_entity_views_using_get_with_http_info(self, customer_id, page_s This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_entity_views_using_get_with_http_info(customer_id, page_size, page, async_req=True) + >>> thread = api.get_customer_entity_views_using_get_with_http_info(customer_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -88,7 +274,11 @@ def get_customer_entity_views_using_get_with_http_info(self, customer_id, page_s 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_views_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'customer_id' is set @@ -134,10 +324,6 @@ def get_customer_entity_views_using_get_with_http_info(self, customer_id, page_s header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -162,7 +348,7 @@ def get_entity_view_by_id_using_get(self, entity_view_id, **kwargs): # noqa: E5 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_view_by_id_using_get(entity_view_id, async_req=True) + >>> thread = api.get_entity_view_by_id_using_get(entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -183,7 +369,7 @@ def get_entity_view_by_id_using_get_with_http_info(self, entity_view_id, **kwarg This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_view_by_id_using_get_with_http_info(entity_view_id, async_req=True) + >>> thread = api.get_entity_view_by_id_using_get_with_http_info(entity_view_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -201,7 +387,11 @@ def get_entity_view_by_id_using_get_with_http_info(self, entity_view_id, **kwarg 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_by_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_view_id' is set @@ -227,10 +417,6 @@ def get_entity_view_by_id_using_get_with_http_info(self, entity_view_id, **kwarg header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -255,7 +441,7 @@ def get_entity_view_types_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_view_types_using_get(async_req=True) + >>> thread = api.get_entity_view_types_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -275,7 +461,7 @@ def get_entity_view_types_using_get_with_http_info(self, **kwargs): # noqa: E50 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_view_types_using_get_with_http_info(async_req=True) + >>> thread = api.get_entity_view_types_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -292,7 +478,11 @@ def get_entity_view_types_using_get_with_http_info(self, **kwargs): # noqa: E50 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_types_using_get" % key + ) params[key] = val del params['kwargs'] @@ -312,10 +502,6 @@ def get_entity_view_types_using_get_with_http_info(self, **kwargs): # noqa: E50 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -340,7 +526,7 @@ def get_entity_views_by_entity_group_id_using_get(self, entity_group_id, page_si This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_views_by_entity_group_id_using_get(entity_group_id, page_size, page, async_req=True) + >>> thread = api.get_entity_views_by_entity_group_id_using_get(entity_group_id, page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -366,7 +552,7 @@ def get_entity_views_by_entity_group_id_using_get_with_http_info(self, entity_gr This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_views_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, async_req=True) + >>> thread = api.get_entity_views_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 @@ -389,7 +575,11 @@ def get_entity_views_by_entity_group_id_using_get_with_http_info(self, entity_gr 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_views_by_entity_group_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_group_id' is set @@ -405,10 +595,6 @@ def get_entity_views_by_entity_group_id_using_get_with_http_info(self, entity_gr params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_entity_views_by_entity_group_id_using_get`") # noqa: E501 - if 'page_size' in params and params['page_size'] < 1.0: # noqa: E501 - raise ValueError("Invalid value for parameter `page_size` when calling `get_entity_views_by_entity_group_id_using_get`, must be a value greater than or equal to `1.0`") # noqa: E501 - if 'page' in params and params['page'] < 0.0: # noqa: E501 - raise ValueError("Invalid value for parameter `page` when calling `get_entity_views_by_entity_group_id_using_get`, must be a value greater than or equal to `0.0`") # noqa: E501 collection_formats = {} path_params = {} @@ -437,10 +623,6 @@ def get_entity_views_by_entity_group_id_using_get_with_http_info(self, entity_gr header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -465,7 +647,7 @@ def get_entity_views_by_ids_using_get(self, entity_view_ids, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_views_by_ids_using_get(entity_view_ids, async_req=True) + >>> thread = api.get_entity_views_by_ids_using_get(entity_view_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -486,7 +668,7 @@ def get_entity_views_by_ids_using_get_with_http_info(self, entity_view_ids, **kw This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_views_by_ids_using_get_with_http_info(entity_view_ids, async_req=True) + >>> thread = api.get_entity_views_by_ids_using_get_with_http_info(entity_view_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -504,7 +686,11 @@ def get_entity_views_by_ids_using_get_with_http_info(self, entity_view_ids, **kw 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_views_by_ids_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_view_ids' is set @@ -530,10 +716,6 @@ def get_entity_views_by_ids_using_get_with_http_info(self, entity_view_ids, **kw header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -553,12 +735,105 @@ def get_entity_views_by_ids_using_get_with_http_info(self, entity_view_ids, **kw _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_tenant_entity_view_using_get(self, entity_view_name, **kwargs): # noqa: E501 + """getTenantEntityView # noqa: 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_entity_view_using_get(entity_view_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_view_name: entityViewName (required) + :return: EntityView + 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_entity_view_using_get_with_http_info(entity_view_name, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_entity_view_using_get_with_http_info(entity_view_name, **kwargs) # noqa: E501 + return data + + def get_tenant_entity_view_using_get_with_http_info(self, entity_view_name, **kwargs): # noqa: E501 + """getTenantEntityView # noqa: 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_entity_view_using_get_with_http_info(entity_view_name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str entity_view_name: entityViewName (required) + :return: EntityView + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['entity_view_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_tenant_entity_view_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'entity_view_name' is set + if ('entity_view_name' not in params or + params['entity_view_name'] is None): + raise ValueError("Missing the required parameter `entity_view_name` when calling `get_tenant_entity_view_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'entity_view_name' in params: + query_params.append(('entityViewName', params['entity_view_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenant/entityViews{?entityViewName}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EntityView', # 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_entity_views_using_get(self, page_size, page, **kwargs): # noqa: E501 """getTenantEntityViews # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_entity_views_using_get(page_size, page, async_req=True) + >>> thread = api.get_tenant_entity_views_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -584,7 +859,7 @@ def get_tenant_entity_views_using_get_with_http_info(self, page_size, page, **kw This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_entity_views_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_tenant_entity_views_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -607,7 +882,11 @@ def get_tenant_entity_views_using_get_with_http_info(self, page_size, page, **kw 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_entity_views_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set @@ -647,10 +926,6 @@ def get_tenant_entity_views_using_get_with_http_info(self, page_size, page, **kw header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -675,7 +950,7 @@ def get_user_entity_views_using_get(self, page_size, page, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_entity_views_using_get(page_size, page, async_req=True) + >>> thread = api.get_user_entity_views_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -701,7 +976,7 @@ def get_user_entity_views_using_get_with_http_info(self, page_size, page, **kwar This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_entity_views_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_user_entity_views_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -724,7 +999,11 @@ def get_user_entity_views_using_get_with_http_info(self, page_size, page, **kwar 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_entity_views_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set @@ -764,10 +1043,6 @@ def get_user_entity_views_using_get_with_http_info(self, page_size, page, **kwar header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -787,16 +1062,16 @@ def get_user_entity_views_using_get_with_http_info(self, page_size, page, **kwar _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_entity_view_using_post(self, entity_view, **kwargs): # noqa: E501 + def save_entity_view_using_post(self, body, **kwargs): # noqa: E501 """saveEntityView # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_view_using_post(entity_view, async_req=True) + >>> thread = api.save_entity_view_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EntityView entity_view: entityView (required) + :param EntityView body: entityView (required) :param str entity_group_id: entityGroupId :return: EntityView If the method is called asynchronously, @@ -804,28 +1079,28 @@ def save_entity_view_using_post(self, entity_view, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_entity_view_using_post_with_http_info(entity_view, **kwargs) # noqa: E501 + return self.save_entity_view_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_entity_view_using_post_with_http_info(entity_view, **kwargs) # noqa: E501 + (data) = self.save_entity_view_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_entity_view_using_post_with_http_info(self, entity_view, **kwargs): # noqa: E501 + def save_entity_view_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveEntityView # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_entity_view_using_post_with_http_info(entity_view, async_req=True) + >>> thread = api.save_entity_view_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param EntityView entity_view: entityView (required) + :param EntityView body: entityView (required) :param str entity_group_id: entityGroupId :return: EntityView If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_view', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -833,13 +1108,17 @@ def save_entity_view_using_post_with_http_info(self, entity_view, **kwargs): # 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_entity_view_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'entity_view' is set - if ('entity_view' not in params or - params['entity_view'] is None): - raise ValueError("Missing the required parameter `entity_view` when calling `save_entity_view_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_entity_view_using_post`") # noqa: E501 collection_formats = {} @@ -855,8 +1134,8 @@ def save_entity_view_using_post_with_http_info(self, entity_view, **kwargs): # local_var_files = {} body_params = None - if 'entity_view' in params: - body_params = params['entity_view'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 1425ff32..3dbd0a10 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class GroupPermissionControllerApi(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 """ @@ -39,7 +37,7 @@ def delete_group_permission_using_delete(self, group_permission_id, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_group_permission_using_delete(group_permission_id, async_req=True) + >>> thread = api.delete_group_permission_using_delete(group_permission_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +58,7 @@ def delete_group_permission_using_delete_with_http_info(self, group_permission_i This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_group_permission_using_delete_with_http_info(group_permission_id, async_req=True) + >>> thread = api.delete_group_permission_using_delete_with_http_info(group_permission_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,7 +76,11 @@ def delete_group_permission_using_delete_with_http_info(self, group_permission_i 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_group_permission_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'group_permission_id' is set @@ -100,14 +102,6 @@ def delete_group_permission_using_delete_with_http_info(self, group_permission_i local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -132,7 +126,7 @@ def get_entity_group_permissions_using_get(self, entity_group_id, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_group_permissions_using_get(entity_group_id, async_req=True) + >>> thread = api.get_entity_group_permissions_using_get(entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -153,7 +147,7 @@ def get_entity_group_permissions_using_get_with_http_info(self, entity_group_id, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_entity_group_permissions_using_get_with_http_info(entity_group_id, async_req=True) + >>> thread = api.get_entity_group_permissions_using_get_with_http_info(entity_group_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -171,7 +165,11 @@ def get_entity_group_permissions_using_get_with_http_info(self, entity_group_id, 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_group_permissions_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'entity_group_id' is set @@ -197,10 +195,6 @@ def get_entity_group_permissions_using_get_with_http_info(self, entity_group_id, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -225,7 +219,7 @@ def get_group_permission_by_id_using_get(self, group_permission_id, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_group_permission_by_id_using_get(group_permission_id, async_req=True) + >>> thread = api.get_group_permission_by_id_using_get(group_permission_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -246,7 +240,7 @@ def get_group_permission_by_id_using_get_with_http_info(self, group_permission_i This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_group_permission_by_id_using_get_with_http_info(group_permission_id, async_req=True) + >>> thread = api.get_group_permission_by_id_using_get_with_http_info(group_permission_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -264,7 +258,11 @@ def get_group_permission_by_id_using_get_with_http_info(self, group_permission_i 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_permission_by_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'group_permission_id' is set @@ -290,10 +288,6 @@ def get_group_permission_by_id_using_get_with_http_info(self, group_permission_i header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -318,7 +312,7 @@ def get_group_permission_info_by_id_using_get(self, group_permission_id, is_user This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_group_permission_info_by_id_using_get(group_permission_id, is_user_group, async_req=True) + >>> thread = api.get_group_permission_info_by_id_using_get(group_permission_id, is_user_group, async_req=True) >>> result = thread.get() :param async_req bool @@ -340,7 +334,7 @@ def get_group_permission_info_by_id_using_get_with_http_info(self, group_permiss This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_group_permission_info_by_id_using_get_with_http_info(group_permission_id, is_user_group, async_req=True) + >>> thread = api.get_group_permission_info_by_id_using_get_with_http_info(group_permission_id, is_user_group, async_req=True) >>> result = thread.get() :param async_req bool @@ -359,7 +353,11 @@ def get_group_permission_info_by_id_using_get_with_http_info(self, group_permiss 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_permission_info_by_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'group_permission_id' is set @@ -391,10 +389,6 @@ def get_group_permission_info_by_id_using_get_with_http_info(self, group_permiss header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -419,7 +413,7 @@ def get_user_group_permissions_using_get(self, user_group_id, **kwargs): # noqa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_group_permissions_using_get(user_group_id, async_req=True) + >>> thread = api.get_user_group_permissions_using_get(user_group_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -440,7 +434,7 @@ def get_user_group_permissions_using_get_with_http_info(self, user_group_id, **k This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_group_permissions_using_get_with_http_info(user_group_id, async_req=True) + >>> thread = api.get_user_group_permissions_using_get_with_http_info(user_group_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -458,7 +452,11 @@ def get_user_group_permissions_using_get_with_http_info(self, user_group_id, **k 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_group_permissions_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'user_group_id' is set @@ -484,10 +482,6 @@ def get_user_group_permissions_using_get_with_http_info(self, user_group_id, **k header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -507,43 +501,43 @@ def get_user_group_permissions_using_get_with_http_info(self, user_group_id, **k _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def load_user_group_permission_infos_using_post(self, permissions, **kwargs): # noqa: E501 + def load_user_group_permission_infos_using_post(self, body, **kwargs): # noqa: E501 """loadUserGroupPermissionInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.load_user_group_permission_infos_using_post(permissions, async_req=True) + >>> thread = api.load_user_group_permission_infos_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param list[GroupPermission] permissions: permissions (required) + :param list[GroupPermission] body: permissions (required) :return: list[GroupPermissionInfo] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.load_user_group_permission_infos_using_post_with_http_info(permissions, **kwargs) # noqa: E501 + return self.load_user_group_permission_infos_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.load_user_group_permission_infos_using_post_with_http_info(permissions, **kwargs) # noqa: E501 + (data) = self.load_user_group_permission_infos_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def load_user_group_permission_infos_using_post_with_http_info(self, permissions, **kwargs): # noqa: E501 + def load_user_group_permission_infos_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """loadUserGroupPermissionInfos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.load_user_group_permission_infos_using_post_with_http_info(permissions, async_req=True) + >>> thread = api.load_user_group_permission_infos_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param list[GroupPermission] permissions: permissions (required) + :param list[GroupPermission] body: permissions (required) :return: list[GroupPermissionInfo] If the method is called asynchronously, returns the request thread. """ - all_params = ['permissions'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -551,13 +545,17 @@ def load_user_group_permission_infos_using_post_with_http_info(self, permissions 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_user_group_permission_infos_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'permissions' is set - if ('permissions' not in params or - params['permissions'] is None): - raise ValueError("Missing the required parameter `permissions` when calling `load_user_group_permission_infos_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `load_user_group_permission_infos_using_post`") # noqa: E501 collection_formats = {} @@ -571,8 +569,8 @@ def load_user_group_permission_infos_using_post_with_http_info(self, permissions local_var_files = {} body_params = None - if 'permissions' in params: - body_params = params['permissions'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -600,43 +598,43 @@ def load_user_group_permission_infos_using_post_with_http_info(self, permissions _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_group_permission_using_post(self, group_permission, **kwargs): # noqa: E501 + def save_group_permission_using_post(self, body, **kwargs): # noqa: E501 """saveGroupPermission # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_group_permission_using_post(group_permission, async_req=True) + >>> thread = api.save_group_permission_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param GroupPermission group_permission: groupPermission (required) + :param GroupPermission body: groupPermission (required) :return: GroupPermission If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_group_permission_using_post_with_http_info(group_permission, **kwargs) # noqa: E501 + return self.save_group_permission_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_group_permission_using_post_with_http_info(group_permission, **kwargs) # noqa: E501 + (data) = self.save_group_permission_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_group_permission_using_post_with_http_info(self, group_permission, **kwargs): # noqa: E501 + def save_group_permission_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveGroupPermission # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_group_permission_using_post_with_http_info(group_permission, async_req=True) + >>> thread = api.save_group_permission_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param GroupPermission group_permission: groupPermission (required) + :param GroupPermission body: groupPermission (required) :return: GroupPermission If the method is called asynchronously, returns the request thread. """ - all_params = ['group_permission'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -644,13 +642,17 @@ def save_group_permission_using_post_with_http_info(self, group_permission, **kw 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_group_permission_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'group_permission' is set - if ('group_permission' not in params or - params['group_permission'] is None): - raise ValueError("Missing the required parameter `group_permission` when calling `save_group_permission_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_group_permission_using_post`") # noqa: E501 collection_formats = {} @@ -664,8 +666,8 @@ def save_group_permission_using_post_with_http_info(self, group_permission, **kw local_var_files = {} body_params = None - if 'group_permission' in params: - body_params = params['group_permission'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 diff --git a/tb_rest_client/api/api_pe/http_integration_controller_api.py b/tb_rest_client/api/api_pe/http_integration_controller_api.py index a322f319..7aed8ad7 100644 --- a/tb_rest_client/api/api_pe/http_integration_controller_api.py +++ b/tb_rest_client/api/api_pe/http_integration_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class HttpIntegrationControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,13 +37,13 @@ def check_status_using_get(self, routing_key, request_params, request_headers, * This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.check_status_using_get(routing_key, request_params, request_headers, async_req=True) + >>> thread = api.check_status_using_get(routing_key, request_params, request_headers, async_req=True) >>> result = thread.get() :param async_req bool :param str routing_key: routingKey (required) - :param object request_params: requestParams (required) - :param object request_headers: requestHeaders (required) + :param Object request_params: requestParams (required) + :param Object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. @@ -62,13 +60,13 @@ def check_status_using_get_with_http_info(self, routing_key, request_params, req This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.check_status_using_get_with_http_info(routing_key, request_params, request_headers, async_req=True) + >>> thread = api.check_status_using_get_with_http_info(routing_key, request_params, request_headers, async_req=True) >>> result = thread.get() :param async_req bool :param str routing_key: routingKey (required) - :param object request_params: requestParams (required) - :param object request_headers: requestHeaders (required) + :param Object request_params: requestParams (required) + :param Object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. @@ -82,7 +80,11 @@ def check_status_using_get_with_http_info(self, routing_key, request_params, req 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_status_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'routing_key' is set @@ -120,10 +122,6 @@ def check_status_using_get_with_http_info(self, routing_key, request_params, req header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -143,49 +141,45 @@ def check_status_using_get_with_http_info(self, routing_key, request_params, req _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_post2(self, routing_key, suffix, request_params, request_headers, **kwargs): # noqa: E501 + def process_request_using_post1(self, routing_key, suffix, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_post2(routing_key, suffix, request_params, request_headers, async_req=True) + >>> thread = api.process_request_using_post1(routing_key, suffix, async_req=True) >>> result = thread.get() :param async_req bool :param str routing_key: routingKey (required) :param str suffix: suffix (required) - :param object request_params: requestParams (required) - :param object request_headers: requestHeaders (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.process_request_using_post2_with_http_info(routing_key, suffix, request_params, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_post1_with_http_info(routing_key, suffix, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_post2_with_http_info(routing_key, suffix, request_params, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_post1_with_http_info(routing_key, suffix, **kwargs) # noqa: E501 return data - def process_request_using_post2_with_http_info(self, routing_key, suffix, request_params, request_headers, **kwargs): # noqa: E501 + def process_request_using_post1_with_http_info(self, routing_key, suffix, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_post2_with_http_info(routing_key, suffix, request_params, request_headers, async_req=True) + >>> thread = api.process_request_using_post1_with_http_info(routing_key, suffix, async_req=True) >>> result = thread.get() :param async_req bool :param str routing_key: routingKey (required) :param str suffix: suffix (required) - :param object request_params: requestParams (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'suffix', 'request_params', 'request_headers'] # noqa: E501 + all_params = ['routing_key', 'suffix'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -193,25 +187,21 @@ def process_request_using_post2_with_http_info(self, routing_key, suffix, reques 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 process_request_using_post1" % 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 `process_request_using_post2`") # noqa: E501 + raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_post1`") # noqa: E501 # verify the required parameter 'suffix' is set if ('suffix' not in params or params['suffix'] is None): - raise ValueError("Missing the required parameter `suffix` when calling `process_request_using_post2`") # noqa: E501 - # verify the required parameter 'request_params' is set - if ('request_params' not in params or - params['request_params'] is None): - raise ValueError("Missing the required parameter `request_params` when calling `process_request_using_post2`") # noqa: E501 - # verify the required parameter 'request_headers' is set - if ('request_headers' not in params or - params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post2`") # noqa: E501 + raise ValueError("Missing the required parameter `suffix` when calling `process_request_using_post1`") # noqa: E501 collection_formats = {} @@ -224,23 +214,15 @@ def process_request_using_post2_with_http_info(self, routing_key, suffix, reques query_params = [] header_params = {} - if 'request_headers' in params: - header_params['requestHeaders'] = params['request_headers'] # noqa: E501 form_params = [] local_var_files = {} - if 'request_params' in params: - form_params.append(('requestParams', params['request_params'])) # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/x-www-form-urlencoded']) # noqa: E501 - # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 @@ -260,49 +242,45 @@ def process_request_using_post2_with_http_info(self, routing_key, suffix, reques _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_post3(self, routing_key, suffix, request_params, request_headers, **kwargs): # noqa: E501 + def process_request_using_post2(self, routing_key, suffix, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_post3(routing_key, suffix, request_params, request_headers, async_req=True) + >>> thread = api.process_request_using_post2(routing_key, suffix, async_req=True) >>> result = thread.get() :param async_req bool :param str routing_key: routingKey (required) :param str suffix: suffix (required) - :param object request_params: requestParams (required) - :param object request_headers: requestHeaders (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.process_request_using_post3_with_http_info(routing_key, suffix, request_params, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_post2_with_http_info(routing_key, suffix, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_post3_with_http_info(routing_key, suffix, request_params, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_post2_with_http_info(routing_key, suffix, **kwargs) # noqa: E501 return data - def process_request_using_post3_with_http_info(self, routing_key, suffix, request_params, request_headers, **kwargs): # noqa: E501 + def process_request_using_post2_with_http_info(self, routing_key, suffix, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_post3_with_http_info(routing_key, suffix, request_params, request_headers, async_req=True) + >>> thread = api.process_request_using_post2_with_http_info(routing_key, suffix, async_req=True) >>> result = thread.get() :param async_req bool :param str routing_key: routingKey (required) :param str suffix: suffix (required) - :param object request_params: requestParams (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'suffix', 'request_params', 'request_headers'] # noqa: E501 + all_params = ['routing_key', 'suffix'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -310,25 +288,21 @@ def process_request_using_post3_with_http_info(self, routing_key, suffix, reques 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 process_request_using_post2" % 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 `process_request_using_post3`") # noqa: E501 + raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_post2`") # noqa: E501 # verify the required parameter 'suffix' is set if ('suffix' not in params or params['suffix'] is None): - raise ValueError("Missing the required parameter `suffix` when calling `process_request_using_post3`") # noqa: E501 - # verify the required parameter 'request_params' is set - if ('request_params' not in params or - params['request_params'] is None): - raise ValueError("Missing the required parameter `request_params` when calling `process_request_using_post3`") # noqa: E501 - # verify the required parameter 'request_headers' is set - if ('request_headers' not in params or - params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post3`") # noqa: E501 + raise ValueError("Missing the required parameter `suffix` when calling `process_request_using_post2`") # noqa: E501 collection_formats = {} @@ -341,23 +315,15 @@ def process_request_using_post3_with_http_info(self, routing_key, suffix, reques query_params = [] header_params = {} - if 'request_headers' in params: - header_params['requestHeaders'] = params['request_headers'] # noqa: E501 form_params = [] local_var_files = {} - if 'request_params' in params: - form_params.append(('requestParams', params['request_params'])) # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/x-www-form-urlencoded']) # noqa: E501 - # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 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 a18e7bde..ef494ce5 100644 --- a/tb_rest_client/api/api_pe/integration_controller_api.py +++ b/tb_rest_client/api/api_pe/integration_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class IntegrationControllerApi(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 """ @@ -34,12 +32,105 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def check_integration_connection_using_post(self, body, **kwargs): # noqa: E501 + """checkIntegrationConnection # 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Integration body: integration (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.check_integration_connection_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.check_integration_connection_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def check_integration_connection_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """checkIntegrationConnection # 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Integration body: integration (required) + :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'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `check_integration_connection_using_post`") # noqa: E501 + + 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 `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 delete_integration_using_delete(self, integration_id, **kwargs): # noqa: E501 """deleteIntegration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_integration_using_delete(integration_id, async_req=True) + >>> thread = api.delete_integration_using_delete(integration_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +151,7 @@ def delete_integration_using_delete_with_http_info(self, integration_id, **kwarg This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_integration_using_delete_with_http_info(integration_id, async_req=True) + >>> thread = api.delete_integration_using_delete_with_http_info(integration_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,13 +169,17 @@ def delete_integration_using_delete_with_http_info(self, integration_id, **kwarg 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_integration_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 `delete_integration_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `integration_id` when calling `delete_integration_using_delete`") # noqa: E501 collection_formats = {} @@ -100,14 +195,6 @@ def delete_integration_using_delete_with_http_info(self, integration_id, **kwarg local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -132,7 +219,7 @@ def get_integration_by_id_using_get(self, integration_id, **kwargs): # noqa: E5 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_integration_by_id_using_get(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 @@ -153,7 +240,7 @@ def get_integration_by_id_using_get_with_http_info(self, integration_id, **kwarg This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_integration_by_id_using_get_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 @@ -171,13 +258,17 @@ def get_integration_by_id_using_get_with_http_info(self, integration_id, **kwarg 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_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 `get_integration_by_id_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `integration_id` when calling `get_integration_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -197,10 +288,6 @@ def get_integration_by_id_using_get_with_http_info(self, integration_id, **kwarg header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -225,7 +312,7 @@ def get_integration_by_routing_key_using_get(self, routing_key, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_integration_by_routing_key_using_get(routing_key, async_req=True) + >>> thread = api.get_integration_by_routing_key_using_get(routing_key, async_req=True) >>> result = thread.get() :param async_req bool @@ -246,7 +333,7 @@ def get_integration_by_routing_key_using_get_with_http_info(self, routing_key, * This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_integration_by_routing_key_using_get_with_http_info(routing_key, 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 @@ -264,13 +351,17 @@ def get_integration_by_routing_key_using_get_with_http_info(self, routing_key, * 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_integration_by_routing_key_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 + raise ValueError("Missing the required parameter `routing_key` when calling `get_integration_by_routing_key_using_get`") # noqa: E501 collection_formats = {} @@ -290,10 +381,6 @@ def get_integration_by_routing_key_using_get_with_http_info(self, routing_key, * header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -318,7 +405,7 @@ def get_integrations_by_ids_using_get(self, integration_ids, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_integrations_by_ids_using_get(integration_ids, async_req=True) + >>> thread = api.get_integrations_by_ids_using_get(integration_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -339,7 +426,7 @@ def get_integrations_by_ids_using_get_with_http_info(self, integration_ids, **kw This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_integrations_by_ids_using_get_with_http_info(integration_ids, async_req=True) + >>> thread = api.get_integrations_by_ids_using_get_with_http_info(integration_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -357,13 +444,17 @@ def get_integrations_by_ids_using_get_with_http_info(self, integration_ids, **kw 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_integrations_by_ids_using_get" % key + ) params[key] = val del params['kwargs'] # 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 `get_integrations_by_ids_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `integration_ids` when calling `get_integrations_by_ids_using_get`") # noqa: E501 collection_formats = {} @@ -383,10 +474,6 @@ def get_integrations_by_ids_using_get_with_http_info(self, integration_ids, **kw header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -411,7 +498,7 @@ def get_integrations_using_get(self, page_size, page, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_integrations_using_get(page_size, page, async_req=True) + >>> thread = api.get_integrations_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -436,7 +523,7 @@ def get_integrations_using_get_with_http_info(self, page_size, page, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_integrations_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_integrations_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -458,18 +545,21 @@ def get_integrations_using_get_with_http_info(self, page_size, page, **kwargs): 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_integrations_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_integrations_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page_size` when calling `get_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_integrations_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `page` when calling `get_integrations_using_get`") # noqa: E501 collection_formats = {} @@ -497,10 +587,6 @@ def get_integrations_using_get_with_http_info(self, page_size, page, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -520,137 +606,43 @@ def get_integrations_using_get_with_http_info(self, page_size, page, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def check_integration_connection_using_post(self, integration, **kwargs): - """checkIntegrationConnection # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.check_integration_connection_using_post(integration, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param Integration integration: integration (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.check_integration_connection_using_post_with_http_info(integration, **kwargs) # noqa: E501 - else: - (data) = self.check_integration_connection_using_post_with_http_info(integration, **kwargs) # noqa: E501 - return data - - def check_integration_connection_using_post_with_http_info(self, integration, **kwargs): - """checkIntegrationConnection # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.check_integration_connection_using_post_with_http_info(integration, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param Integration integration: integration (required) - :return: Integration - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['integration'] # 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']): - params[key] = val - del params['kwargs'] - # verify the required parameter 'integration' is set - if ('integration' not in params or - params['integration'] is None): - raise ValueError( - "Missing the required parameter `integration` when calling `check_integration_connection_using_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'integration' in params: - body_params = params['integration'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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='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 save_integration_using_post(self, integration, **kwargs): # noqa: E501 + def save_integration_using_post(self, body, **kwargs): # noqa: E501 """saveIntegration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_integration_using_post(integration, async_req=True) + >>> thread = api.save_integration_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Integration integration: integration (required) + :param Integration body: integration (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.save_integration_using_post_with_http_info(integration, **kwargs) # noqa: E501 + return self.save_integration_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_integration_using_post_with_http_info(integration, **kwargs) # noqa: E501 + (data) = self.save_integration_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_integration_using_post_with_http_info(self, integration, **kwargs): # noqa: E501 + def save_integration_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveIntegration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_integration_using_post_with_http_info(integration, async_req=True) + >>> thread = api.save_integration_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Integration integration: integration (required) + :param Integration body: integration (required) :return: Integration If the method is called asynchronously, returns the request thread. """ - all_params = ['integration'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -658,13 +650,17 @@ def save_integration_using_post_with_http_info(self, integration, **kwargs): # 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_integration_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'integration' is set - if ('integration' not in params or - params['integration'] is None): - raise ValueError( - "Missing the required parameter `integration` when calling `save_integration_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_integration_using_post`") # noqa: E501 collection_formats = {} @@ -678,8 +674,8 @@ def save_integration_using_post_with_http_info(self, integration, **kwargs): # local_var_files = {} body_params = None - if 'integration' in params: - body_params = params['integration'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 diff --git a/tb_rest_client/api/api_pe/loriot_integration_controller_api.py b/tb_rest_client/api/api_pe/loriot_integration_controller_api.py index cc7c7dbd..3e60f548 100644 --- a/tb_rest_client/api/api_pe/loriot_integration_controller_api.py +++ b/tb_rest_client/api/api_pe/loriot_integration_controller_api.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -33,47 +32,47 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def process_request_using_delete1(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_delete1(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_delete1(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_delete1(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_delete1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_delete1_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_delete1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_delete1_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_delete1_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_delete1_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_delete1_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_delete1_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -88,18 +87,18 @@ def process_request_using_delete1_with_http_info(self, routing_key, msg, request ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_delete1`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_delete1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_delete1`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_delete1`") # 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 `process_request_using_delete1`") # noqa: E501 collection_formats = {} @@ -117,8 +116,8 @@ def process_request_using_delete1_with_http_info(self, routing_key, msg, request local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -146,47 +145,47 @@ def process_request_using_delete1_with_http_info(self, routing_key, msg, request _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_get1(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_get1(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_get1(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_get1(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_get1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_get1_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_get1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_get1_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_get1_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_get1_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_get1_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_get1_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -201,18 +200,18 @@ def process_request_using_get1_with_http_info(self, routing_key, msg, request_he ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_get1`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_get1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_get1`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_get1`") # 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 `process_request_using_get1`") # noqa: E501 collection_formats = {} @@ -230,8 +229,8 @@ def process_request_using_get1_with_http_info(self, routing_key, msg, request_he local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -259,47 +258,47 @@ def process_request_using_get1_with_http_info(self, routing_key, msg, request_he _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_head1(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_head1(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_head1(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_head1(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_head1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_head1_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_head1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_head1_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_head1_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_head1_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_head1_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_head1_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -314,18 +313,18 @@ def process_request_using_head1_with_http_info(self, routing_key, msg, request_h ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_head1`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_head1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_head1`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_head1`") # 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 `process_request_using_head1`") # noqa: E501 collection_formats = {} @@ -343,8 +342,8 @@ def process_request_using_head1_with_http_info(self, routing_key, msg, request_h local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -372,47 +371,47 @@ def process_request_using_head1_with_http_info(self, routing_key, msg, request_h _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_options1(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_options1(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_options1(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_options1(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_options1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_options1_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_options1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_options1_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_options1_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_options1_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_options1_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_options1_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -427,18 +426,18 @@ def process_request_using_options1_with_http_info(self, routing_key, msg, reques ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_options1`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_options1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_options1`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_options1`") # 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 `process_request_using_options1`") # noqa: E501 collection_formats = {} @@ -456,8 +455,8 @@ def process_request_using_options1_with_http_info(self, routing_key, msg, reques local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -485,47 +484,47 @@ def process_request_using_options1_with_http_info(self, routing_key, msg, reques _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_patch1(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_patch1(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_patch1(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_patch1(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_patch1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_patch1_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_patch1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_patch1_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_patch1_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_patch1_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_patch1_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_patch1_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -540,18 +539,18 @@ def process_request_using_patch1_with_http_info(self, routing_key, msg, request_ ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_patch1`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_patch1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_patch1`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_patch1`") # 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 `process_request_using_patch1`") # noqa: E501 collection_formats = {} @@ -569,8 +568,8 @@ def process_request_using_patch1_with_http_info(self, routing_key, msg, request_ local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -598,47 +597,47 @@ def process_request_using_patch1_with_http_info(self, routing_key, msg, request_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_post7(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_post9(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_post7(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_post9(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_post7_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_post9_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_post7_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_post9_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_post7_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_post9_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_post7_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_post9_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -649,22 +648,22 @@ def process_request_using_post7_with_http_info(self, routing_key, msg, request_h if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method process_request_using_post7" % key + " to method process_request_using_post9" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_post7`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_post7`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_post9`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post7`") # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post9`") # 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 `process_request_using_post9`") # noqa: E501 collection_formats = {} @@ -682,8 +681,8 @@ def process_request_using_post7_with_http_info(self, routing_key, msg, request_h local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -711,47 +710,47 @@ def process_request_using_post7_with_http_info(self, routing_key, msg, request_h _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_put1(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_put1(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_put1(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_put1(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_put1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_put1_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_put1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_put1_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_put1_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_put1_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.process_request_using_put1_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_put1_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -766,18 +765,18 @@ def process_request_using_put1_with_http_info(self, routing_key, msg, request_he ) params[key] = val del params['kwargs'] - # verify the required parameter 'routing_key' is set - if self.api_client.client_side_validation and ('routing_key' not in params or - params['routing_key'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `routing_key` when calling `process_request_using_put1`") # noqa: E501 - # verify the required parameter 'msg' is set - if self.api_client.client_side_validation and ('msg' not in params or - params['msg'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_put1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_put1`") # noqa: E501 # verify the required parameter 'request_headers' is set - if self.api_client.client_side_validation and ('request_headers' not in params or - params['request_headers'] is None): # noqa: E501 + if ('request_headers' not in params or + params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_put1`") # 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 `process_request_using_put1`") # noqa: E501 collection_formats = {} @@ -795,8 +794,8 @@ def process_request_using_put1_with_http_info(self, routing_key, msg, request_he local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -822,4 +821,4 @@ def process_request_using_put1_with_http_info(self, routing_key, msg, request_he _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/lwm_2m_controller_api.py b/tb_rest_client/api/api_pe/lwm_2m_controller_api.py new file mode 100644 index 00000000..995bf9bc --- /dev/null +++ b/tb_rest_client/api/api_pe/lwm_2m_controller_api.py @@ -0,0 +1,223 @@ +# 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 +""" + +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 Lwm2mControllerApi(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_lwm2m_bootstrap_security_info_using_get(self, is_bootstrap_server, **kwargs): # noqa: E501 + """getLwm2mBootstrapSecurityInfo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_lwm2m_bootstrap_security_info_using_get(is_bootstrap_server, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param bool is_bootstrap_server: isBootstrapServer (required) + :return: ServerSecurityConfig + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_lwm2m_bootstrap_security_info_using_get_with_http_info(is_bootstrap_server, **kwargs) # noqa: E501 + else: + (data) = self.get_lwm2m_bootstrap_security_info_using_get_with_http_info(is_bootstrap_server, **kwargs) # noqa: E501 + return data + + def get_lwm2m_bootstrap_security_info_using_get_with_http_info(self, is_bootstrap_server, **kwargs): # noqa: E501 + """getLwm2mBootstrapSecurityInfo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_lwm2m_bootstrap_security_info_using_get_with_http_info(is_bootstrap_server, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param bool is_bootstrap_server: isBootstrapServer (required) + :return: ServerSecurityConfig + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['is_bootstrap_server'] # 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_lwm2m_bootstrap_security_info_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'is_bootstrap_server' is set + if ('is_bootstrap_server' not in params or + params['is_bootstrap_server'] is None): + raise ValueError("Missing the required parameter `is_bootstrap_server` when calling `get_lwm2m_bootstrap_security_info_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'is_bootstrap_server' in params: + path_params['isBootstrapServer'] = params['is_bootstrap_server'] # 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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/lwm2m/deviceProfile/bootstrap/{isBootstrapServer}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ServerSecurityConfig', # 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_device_with_credentials_using_post(self, **kwargs): # noqa: E501 + """saveDeviceWithCredentials # 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) + >>> result = thread.get() + + :param async_req bool + :param dict(str, object) body: deviceWithDeviceCredentials + :param str entity_group_id: entityGroupId + :return: Device + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_device_with_credentials_using_post_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.save_device_with_credentials_using_post_with_http_info(**kwargs) # noqa: E501 + return data + + def save_device_with_credentials_using_post_with_http_info(self, **kwargs): # noqa: E501 + """saveDeviceWithCredentials # 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) + >>> result = thread.get() + + :param async_req bool + :param dict(str, object) body: deviceWithDeviceCredentials + :param str entity_group_id: entityGroupId + :return: Device + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'entity_group_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 save_device_with_credentials_using_post" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'entity_group_id' in params: + query_params.append(('entityGroupId', params['entity_group_id'])) # 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( + ['*/*']) # 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/lwm2m/device-credentials{?entityGroupId}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Device', # 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/ocean_connect_integration_controller_api.py b/tb_rest_client/api/api_pe/ocean_connect_integration_controller_api.py index ca4ffbe8..2b3d5709 100644 --- a/tb_rest_client/api/api_pe/ocean_connect_integration_controller_api.py +++ b/tb_rest_client/api/api_pe/ocean_connect_integration_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class OceanConnectIntegrationControllerApi(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 """ @@ -34,47 +32,47 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def process_request_using_delete(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_delete2(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_delete(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_delete2(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_delete_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_delete2_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_delete_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_delete2_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_delete_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_delete2_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_delete_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_delete2_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -82,21 +80,25 @@ def process_request_using_delete_with_http_info(self, routing_key, msg, request_ 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 process_request_using_delete2" % 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 `process_request_using_delete`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_delete`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_delete2`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_delete`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_delete2`") # 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 `process_request_using_delete2`") # noqa: E501 collection_formats = {} @@ -114,8 +116,8 @@ def process_request_using_delete_with_http_info(self, routing_key, msg, request_ local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -143,47 +145,47 @@ def process_request_using_delete_with_http_info(self, routing_key, msg, request_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_get(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_get2(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_get(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_get2(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_get_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_get2_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_get_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_get2_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_get_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_get2_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_get_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_get2_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -191,21 +193,25 @@ def process_request_using_get_with_http_info(self, routing_key, msg, request_hea 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 process_request_using_get2" % 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 `process_request_using_get`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_get`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_get2`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_get`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_get2`") # 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 `process_request_using_get2`") # noqa: E501 collection_formats = {} @@ -223,8 +229,8 @@ def process_request_using_get_with_http_info(self, routing_key, msg, request_hea local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -252,47 +258,47 @@ def process_request_using_get_with_http_info(self, routing_key, msg, request_hea _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_head(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_head2(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_head(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_head2(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_head_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_head2_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_head_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_head2_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_head_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_head2_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_head_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_head2_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -300,21 +306,25 @@ def process_request_using_head_with_http_info(self, routing_key, msg, request_he 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 process_request_using_head2" % 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 `process_request_using_head`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_head`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_head2`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_head`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_head2`") # 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 `process_request_using_head2`") # noqa: E501 collection_formats = {} @@ -332,8 +342,8 @@ def process_request_using_head_with_http_info(self, routing_key, msg, request_he local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -361,47 +371,47 @@ def process_request_using_head_with_http_info(self, routing_key, msg, request_he _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_options(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_options2(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_options(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_options2(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_options_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_options2_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_options_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_options2_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_options_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_options2_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_options_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_options2_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -409,21 +419,25 @@ def process_request_using_options_with_http_info(self, routing_key, msg, request 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 process_request_using_options2" % 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 `process_request_using_options`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_options`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_options2`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_options`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_options2`") # 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 `process_request_using_options2`") # noqa: E501 collection_formats = {} @@ -441,8 +455,8 @@ def process_request_using_options_with_http_info(self, routing_key, msg, request local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -470,47 +484,47 @@ def process_request_using_options_with_http_info(self, routing_key, msg, request _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_patch(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_patch2(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_patch(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_patch2(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_patch_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_patch2_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_patch_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_patch2_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_patch_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_patch2_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_patch_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_patch2_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -518,21 +532,25 @@ def process_request_using_patch_with_http_info(self, routing_key, msg, request_h 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 process_request_using_patch2" % 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 `process_request_using_patch`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_patch`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_patch2`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_patch`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_patch2`") # 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 `process_request_using_patch2`") # noqa: E501 collection_formats = {} @@ -550,8 +568,8 @@ def process_request_using_patch_with_http_info(self, routing_key, msg, request_h local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -579,47 +597,47 @@ def process_request_using_patch_with_http_info(self, routing_key, msg, request_h _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_post4(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_post10(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_post4(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_post10(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_post4_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_post10_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_post4_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_post10_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_post4_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_post10_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_post4_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_post10_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -627,21 +645,25 @@ def process_request_using_post4_with_http_info(self, routing_key, msg, request_h 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 process_request_using_post10" % 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 `process_request_using_post4`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_post4`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_post10`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post4`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post10`") # 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 `process_request_using_post10`") # noqa: E501 collection_formats = {} @@ -659,8 +681,8 @@ def process_request_using_post4_with_http_info(self, routing_key, msg, request_h local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -688,47 +710,47 @@ def process_request_using_post4_with_http_info(self, routing_key, msg, request_h _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_put(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_put2(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_put(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_put2(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_put_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_put2_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_put_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_put2_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_put_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_put2_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_put_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_put2_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -736,21 +758,25 @@ def process_request_using_put_with_http_info(self, routing_key, msg, request_hea 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 process_request_using_put2" % 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 `process_request_using_put`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_put`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_put2`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_put`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_put2`") # 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 `process_request_using_put2`") # noqa: E501 collection_formats = {} @@ -768,8 +794,8 @@ def process_request_using_put_with_http_info(self, routing_key, msg, request_hea local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 new file mode 100644 index 00000000..50151417 --- /dev/null +++ b/tb_rest_client/api/api_pe/ota_package_controller_api.py @@ -0,0 +1,986 @@ +# 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 +""" + +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 OtaPackageControllerApi(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_ota_package_using_delete(self, ota_package_id, **kwargs): # noqa: E501 + """deleteOtaPackage # 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_ota_package_using_delete(ota_package_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ota_package_id: otaPackageId (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_ota_package_using_delete_with_http_info(ota_package_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_ota_package_using_delete_with_http_info(ota_package_id, **kwargs) # noqa: E501 + return data + + def delete_ota_package_using_delete_with_http_info(self, ota_package_id, **kwargs): # noqa: E501 + """deleteOtaPackage # 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_ota_package_using_delete_with_http_info(ota_package_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ota_package_id: otaPackageId (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ota_package_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_ota_package_using_delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'ota_package_id' is set + if ('ota_package_id' not in params or + params['ota_package_id'] is None): + raise ValueError("Missing the required parameter `ota_package_id` when calling `delete_ota_package_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ota_package_id' in params: + path_params['otaPackageId'] = params['ota_package_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/otaPackage/{otaPackageId}', '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 download_ota_package_using_get(self, ota_package_id, **kwargs): # noqa: E501 + """downloadOtaPackage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_ota_package_using_get(ota_package_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ota_package_id: otaPackageId (required) + :return: Resource + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.download_ota_package_using_get_with_http_info(ota_package_id, **kwargs) # noqa: E501 + else: + (data) = self.download_ota_package_using_get_with_http_info(ota_package_id, **kwargs) # noqa: E501 + return data + + def download_ota_package_using_get_with_http_info(self, ota_package_id, **kwargs): # noqa: E501 + """downloadOtaPackage # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_ota_package_using_get_with_http_info(ota_package_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ota_package_id: otaPackageId (required) + :return: Resource + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ota_package_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 download_ota_package_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'ota_package_id' is set + if ('ota_package_id' not in params or + params['ota_package_id'] is None): + raise ValueError("Missing the required parameter `ota_package_id` when calling `download_ota_package_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ota_package_id' in params: + path_params['otaPackageId'] = params['ota_package_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/otaPackage/{otaPackageId}/download', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + 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'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_group_ota_packages_using_get(self, group_id, type, page_size, page, **kwargs): # noqa: E501 + """getGroupOtaPackages # noqa: 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_ota_packages_using_get(group_id, type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str group_id: groupId (required) + :param str type: type (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: PageDataOtaPackageInfo + 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_ota_packages_using_get_with_http_info(group_id, type, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_group_ota_packages_using_get_with_http_info(group_id, type, page_size, page, **kwargs) # noqa: E501 + return data + + def get_group_ota_packages_using_get_with_http_info(self, group_id, type, page_size, page, **kwargs): # noqa: E501 + """getGroupOtaPackages # noqa: 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_ota_packages_using_get_with_http_info(group_id, type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str group_id: groupId (required) + :param str type: type (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: PageDataOtaPackageInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['group_id', '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_group_ota_packages_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'group_id' is set + if ('group_id' not in params or + params['group_id'] is None): + raise ValueError("Missing the required parameter `group_id` when calling `get_group_ota_packages_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 `get_group_ota_packages_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_group_ota_packages_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_group_ota_packages_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group_id' in params: + path_params['groupId'] = params['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 = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/otaPackages/group/{groupId}/{type}{?pageSize,page,textSearch,sortProperty,sortOrder}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataOtaPackageInfo', # 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_ota_package_by_id_using_get(self, ota_package_id, **kwargs): # noqa: E501 + """getOtaPackageById # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_ota_package_by_id_using_get(ota_package_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ota_package_id: otaPackageId (required) + :return: OtaPackage + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_ota_package_by_id_using_get_with_http_info(ota_package_id, **kwargs) # noqa: E501 + else: + (data) = self.get_ota_package_by_id_using_get_with_http_info(ota_package_id, **kwargs) # noqa: E501 + return data + + def get_ota_package_by_id_using_get_with_http_info(self, ota_package_id, **kwargs): # noqa: E501 + """getOtaPackageById # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_ota_package_by_id_using_get_with_http_info(ota_package_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ota_package_id: otaPackageId (required) + :return: OtaPackage + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ota_package_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_ota_package_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'ota_package_id' is set + if ('ota_package_id' not in params or + params['ota_package_id'] is None): + raise ValueError("Missing the required parameter `ota_package_id` when calling `get_ota_package_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ota_package_id' in params: + path_params['otaPackageId'] = params['ota_package_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/otaPackage/{otaPackageId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OtaPackage', # 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_ota_package_info_by_id_using_get(self, ota_package_id, **kwargs): # noqa: E501 + """getOtaPackageInfoById # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_ota_package_info_by_id_using_get(ota_package_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ota_package_id: otaPackageId (required) + :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.get_ota_package_info_by_id_using_get_with_http_info(ota_package_id, **kwargs) # noqa: E501 + else: + (data) = self.get_ota_package_info_by_id_using_get_with_http_info(ota_package_id, **kwargs) # noqa: E501 + return data + + def get_ota_package_info_by_id_using_get_with_http_info(self, ota_package_id, **kwargs): # noqa: E501 + """getOtaPackageInfoById # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_ota_package_info_by_id_using_get_with_http_info(ota_package_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str ota_package_id: otaPackageId (required) + :return: OtaPackageInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ota_package_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_ota_package_info_by_id_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'ota_package_id' is set + if ('ota_package_id' not in params or + params['ota_package_id'] is None): + raise ValueError("Missing the required parameter `ota_package_id` when calling `get_ota_package_info_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ota_package_id' in params: + path_params['otaPackageId'] = params['ota_package_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/otaPackage/info/{otaPackageId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OtaPackageInfo', # 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_ota_packages_using_get(self, device_profile_id, type, page_size, page, **kwargs): # noqa: E501 + """getOtaPackages # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_ota_packages_using_get(device_profile_id, type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_profile_id: deviceProfileId (required) + :param str type: type (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: PageDataOtaPackageInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_ota_packages_using_get_with_http_info(device_profile_id, type, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_ota_packages_using_get_with_http_info(device_profile_id, type, page_size, page, **kwargs) # noqa: E501 + return data + + def get_ota_packages_using_get_with_http_info(self, device_profile_id, type, page_size, page, **kwargs): # noqa: E501 + """getOtaPackages # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_ota_packages_using_get_with_http_info(device_profile_id, type, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str device_profile_id: deviceProfileId (required) + :param str type: type (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: PageDataOtaPackageInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_profile_id', '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_ota_packages_using_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'device_profile_id' is set + if ('device_profile_id' not in params or + params['device_profile_id'] is None): + raise ValueError("Missing the required parameter `device_profile_id` when calling `get_ota_packages_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 `get_ota_packages_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_ota_packages_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_ota_packages_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'device_profile_id' in params: + path_params['deviceProfileId'] = params['device_profile_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 = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/otaPackages/{deviceProfileId}/{type}{?pageSize,page,textSearch,sortProperty,sortOrder}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataOtaPackageInfo', # 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_ota_packages_using_get1(self, page_size, page, **kwargs): # noqa: E501 + """getOtaPackages # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_ota_packages_using_get1(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :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: PageDataOtaPackageInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_ota_packages_using_get1_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_ota_packages_using_get1_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_ota_packages_using_get1_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getOtaPackages # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_ota_packages_using_get1_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :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: PageDataOtaPackageInfo + 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_ota_packages_using_get1" % 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_ota_packages_using_get1`") # 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_ota_packages_using_get1`") # 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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/otaPackages{?pageSize,page,textSearch,sortProperty,sortOrder}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataOtaPackageInfo', # 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_ota_package_data_using_post(self, file, checksum_algorithm, ota_package_id, **kwargs): # noqa: E501 + """saveOtaPackageData # 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(file, checksum_algorithm, ota_package_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str file: (required) + :param str checksum_algorithm: checksumAlgorithm (required) + :param str ota_package_id: otaPackageId (required) + :param str checksum: checksum + :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(file, checksum_algorithm, ota_package_id, **kwargs) # noqa: E501 + else: + (data) = self.save_ota_package_data_using_post_with_http_info(file, checksum_algorithm, ota_package_id, **kwargs) # noqa: E501 + return data + + def save_ota_package_data_using_post_with_http_info(self, file, checksum_algorithm, ota_package_id, **kwargs): # noqa: E501 + """saveOtaPackageData # 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(file, checksum_algorithm, ota_package_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str file: (required) + :param str checksum_algorithm: checksumAlgorithm (required) + :param str ota_package_id: otaPackageId (required) + :param str checksum: checksum + :return: OtaPackageInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['file', 'checksum_algorithm', 'ota_package_id', 'checksum'] # 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_ota_package_data_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'file' is set + if ('file' not in params or + params['file'] is None): + raise ValueError("Missing the required parameter `file` when calling `save_ota_package_data_using_post`") # noqa: E501 + # 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): + raise ValueError("Missing the required parameter `ota_package_id` when calling `save_ota_package_data_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'ota_package_id' in params: + 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 'file' in params: + local_var_files['file'] = params['file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # 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', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OtaPackageInfo', # 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_ota_package_info_using_post(self, body, **kwargs): # noqa: E501 + """saveOtaPackageInfo # 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_info_using_post(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SaveOtaPackageInfoRequest body: otaPackageInfo (required) + :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_info_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.save_ota_package_info_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def save_ota_package_info_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveOtaPackageInfo # 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_info_using_post_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SaveOtaPackageInfoRequest body: otaPackageInfo (required) + :return: OtaPackageInfo + 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_ota_package_info_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_ota_package_info_using_post`") # noqa: E501 + + 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( + ['*/*']) # 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/otaPackage', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OtaPackageInfo', # 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/owner_controller_api.py b/tb_rest_client/api/api_pe/owner_controller_api.py index a2ac5264..6b6d3de3 100644 --- a/tb_rest_client/api/api_pe/owner_controller_api.py +++ b/tb_rest_client/api/api_pe/owner_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class OwnerControllerApi(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 """ @@ -39,7 +37,7 @@ def change_owner_to_customer_using_post(self, owner_id, entity_type, entity_id, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.change_owner_to_customer_using_post(owner_id, entity_type, entity_id, async_req=True) + >>> thread = api.change_owner_to_customer_using_post(owner_id, entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -62,7 +60,7 @@ def change_owner_to_customer_using_post_with_http_info(self, owner_id, entity_ty This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.change_owner_to_customer_using_post_with_http_info(owner_id, entity_type, entity_id, async_req=True) + >>> thread = api.change_owner_to_customer_using_post_with_http_info(owner_id, entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -82,7 +80,11 @@ def change_owner_to_customer_using_post_with_http_info(self, owner_id, entity_ty 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 change_owner_to_customer_using_post" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'owner_id' is set @@ -116,14 +118,6 @@ def change_owner_to_customer_using_post_with_http_info(self, owner_id, entity_ty local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -148,7 +142,7 @@ def change_owner_to_tenant_using_post(self, owner_id, entity_type, entity_id, ** This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.change_owner_to_tenant_using_post(owner_id, entity_type, entity_id, async_req=True) + >>> thread = api.change_owner_to_tenant_using_post(owner_id, entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -171,7 +165,7 @@ def change_owner_to_tenant_using_post_with_http_info(self, owner_id, entity_type This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.change_owner_to_tenant_using_post_with_http_info(owner_id, entity_type, entity_id, async_req=True) + >>> thread = api.change_owner_to_tenant_using_post_with_http_info(owner_id, entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -191,7 +185,11 @@ def change_owner_to_tenant_using_post_with_http_info(self, owner_id, entity_type 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 change_owner_to_tenant_using_post" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'owner_id' is set @@ -225,14 +223,6 @@ def change_owner_to_tenant_using_post_with_http_info(self, owner_id, entity_type local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/report_controller_api.py b/tb_rest_client/api/api_pe/report_controller_api.py index fd5fa055..e7252ecf 100644 --- a/tb_rest_client/api/api_pe/report_controller_api.py +++ b/tb_rest_client/api/api_pe/report_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class ReportControllerApi(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 """ @@ -34,45 +32,45 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def download_dashboard_report_using_post(self, dashboard_id, report_params, **kwargs): # noqa: E501 + def download_dashboard_report_using_post(self, body, dashboard_id, **kwargs): # noqa: E501 """downloadDashboardReport # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.download_dashboard_report_using_post(dashboard_id, report_params, async_req=True) + >>> thread = api.download_dashboard_report_using_post(body, dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: reportParams (required) :param str dashboard_id: dashboardId (required) - :param str report_params: reportParams (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.download_dashboard_report_using_post_with_http_info(dashboard_id, report_params, **kwargs) # noqa: E501 + return self.download_dashboard_report_using_post_with_http_info(body, dashboard_id, **kwargs) # noqa: E501 else: - (data) = self.download_dashboard_report_using_post_with_http_info(dashboard_id, report_params, **kwargs) # noqa: E501 + (data) = self.download_dashboard_report_using_post_with_http_info(body, dashboard_id, **kwargs) # noqa: E501 return data - def download_dashboard_report_using_post_with_http_info(self, dashboard_id, report_params, **kwargs): # noqa: E501 + def download_dashboard_report_using_post_with_http_info(self, body, dashboard_id, **kwargs): # noqa: E501 """downloadDashboardReport # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.download_dashboard_report_using_post_with_http_info(dashboard_id, report_params, async_req=True) + >>> thread = api.download_dashboard_report_using_post_with_http_info(body, dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: reportParams (required) :param str dashboard_id: dashboardId (required) - :param str report_params: reportParams (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['dashboard_id', 'report_params'] # noqa: E501 + all_params = ['body', 'dashboard_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -80,17 +78,21 @@ def download_dashboard_report_using_post_with_http_info(self, dashboard_id, repo 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 download_dashboard_report_using_post" % key + ) params[key] = val del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `download_dashboard_report_using_post`") # 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 `download_dashboard_report_using_post`") # noqa: E501 - # verify the required parameter 'report_params' is set - if ('report_params' not in params or - params['report_params'] is None): - raise ValueError("Missing the required parameter `report_params` when calling `download_dashboard_report_using_post`") # noqa: E501 collection_formats = {} @@ -106,8 +108,8 @@ def download_dashboard_report_using_post_with_http_info(self, dashboard_id, repo local_var_files = {} body_params = None - if 'report_params' in params: - body_params = params['report_params'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -135,16 +137,16 @@ def download_dashboard_report_using_post_with_http_info(self, dashboard_id, repo _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def download_test_report_using_post(self, report_config, **kwargs): # noqa: E501 + def download_test_report_using_post(self, body, **kwargs): # noqa: E501 """downloadTestReport # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.download_test_report_using_post(report_config, async_req=True) + >>> thread = api.download_test_report_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param ReportConfig report_config: reportConfig (required) + :param ReportConfig body: reportConfig (required) :param str reports_server_endpoint_url: reportsServerEndpointUrl :return: DeferredResultResponseEntity If the method is called asynchronously, @@ -152,28 +154,28 @@ def download_test_report_using_post(self, report_config, **kwargs): # noqa: E50 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.download_test_report_using_post_with_http_info(report_config, **kwargs) # noqa: E501 + return self.download_test_report_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.download_test_report_using_post_with_http_info(report_config, **kwargs) # noqa: E501 + (data) = self.download_test_report_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def download_test_report_using_post_with_http_info(self, report_config, **kwargs): # noqa: E501 + def download_test_report_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """downloadTestReport # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.download_test_report_using_post_with_http_info(report_config, async_req=True) + >>> thread = api.download_test_report_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param ReportConfig report_config: reportConfig (required) + :param ReportConfig body: reportConfig (required) :param str reports_server_endpoint_url: reportsServerEndpointUrl :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['report_config', 'reports_server_endpoint_url'] # noqa: E501 + all_params = ['body', 'reports_server_endpoint_url'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -181,13 +183,17 @@ def download_test_report_using_post_with_http_info(self, report_config, **kwargs 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 download_test_report_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'report_config' is set - if ('report_config' not in params or - params['report_config'] is None): - raise ValueError("Missing the required parameter `report_config` when calling `download_test_report_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `download_test_report_using_post`") # noqa: E501 collection_formats = {} @@ -203,8 +209,8 @@ def download_test_report_using_post_with_http_info(self, report_config, **kwargs local_var_files = {} body_params = None - if 'report_config' in params: - body_params = params['report_config'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 24e2220d..7680a9e0 100644 --- a/tb_rest_client/api/api_pe/role_controller_api.py +++ b/tb_rest_client/api/api_pe/role_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class RoleControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def delete_role_using_delete(self, role_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_role_using_delete(role_id, async_req=True) + >>> thread = api.delete_role_using_delete(role_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +58,7 @@ def delete_role_using_delete_with_http_info(self, role_id, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_role_using_delete_with_http_info(role_id, async_req=True) + >>> thread = api.delete_role_using_delete_with_http_info(role_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,7 +76,11 @@ def delete_role_using_delete_with_http_info(self, role_id, **kwargs): # noqa: E 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_role_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'role_id' is set @@ -100,14 +102,6 @@ def delete_role_using_delete_with_http_info(self, role_id, **kwargs): # noqa: E local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -132,7 +126,7 @@ def get_role_by_id_using_get(self, role_id, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_role_by_id_using_get(role_id, async_req=True) + >>> thread = api.get_role_by_id_using_get(role_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -153,7 +147,7 @@ def get_role_by_id_using_get_with_http_info(self, role_id, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_role_by_id_using_get_with_http_info(role_id, async_req=True) + >>> thread = api.get_role_by_id_using_get_with_http_info(role_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -171,7 +165,11 @@ def get_role_by_id_using_get_with_http_info(self, role_id, **kwargs): # noqa: E 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_role_by_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'role_id' is set @@ -197,10 +195,6 @@ def get_role_by_id_using_get_with_http_info(self, role_id, **kwargs): # noqa: E header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -225,7 +219,7 @@ def get_roles_by_ids_using_get(self, role_ids, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_roles_by_ids_using_get(role_ids, async_req=True) + >>> thread = api.get_roles_by_ids_using_get(role_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -246,7 +240,7 @@ def get_roles_by_ids_using_get_with_http_info(self, role_ids, **kwargs): # noqa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_roles_by_ids_using_get_with_http_info(role_ids, async_req=True) + >>> thread = api.get_roles_by_ids_using_get_with_http_info(role_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -264,7 +258,11 @@ def get_roles_by_ids_using_get_with_http_info(self, role_ids, **kwargs): # noqa 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_roles_by_ids_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'role_ids' is set @@ -290,10 +288,6 @@ def get_roles_by_ids_using_get_with_http_info(self, role_ids, **kwargs): # noqa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -318,7 +312,7 @@ def get_roles_using_get(self, page_size, page, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_roles_using_get(page_size, page, async_req=True) + >>> thread = api.get_roles_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -344,7 +338,7 @@ def get_roles_using_get_with_http_info(self, page_size, page, **kwargs): # noqa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_roles_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_roles_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -367,7 +361,11 @@ def get_roles_using_get_with_http_info(self, page_size, page, **kwargs): # noqa 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_roles_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set @@ -407,10 +405,6 @@ def get_roles_using_get_with_http_info(self, page_size, page, **kwargs): # noqa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -430,43 +424,43 @@ def get_roles_using_get_with_http_info(self, page_size, page, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_role_using_post(self, role, **kwargs): # noqa: E501 + def save_role_using_post(self, body, **kwargs): # noqa: E501 """saveRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_role_using_post(role, async_req=True) + >>> thread = api.save_role_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Role role: role (required) + :param Role body: role (required) :return: Role If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_role_using_post_with_http_info(role, **kwargs) # noqa: E501 + return self.save_role_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_role_using_post_with_http_info(role, **kwargs) # noqa: E501 + (data) = self.save_role_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_role_using_post_with_http_info(self, role, **kwargs): # noqa: E501 + def save_role_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_role_using_post_with_http_info(role, async_req=True) + >>> thread = api.save_role_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param Role role: role (required) + :param Role body: role (required) :return: Role If the method is called asynchronously, returns the request thread. """ - all_params = ['role'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -474,13 +468,17 @@ def save_role_using_post_with_http_info(self, role, **kwargs): # noqa: E501 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_role_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'role' is set - if ('role' not in params or - params['role'] is None): - raise ValueError("Missing the required parameter `role` when calling `save_role_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_role_using_post`") # noqa: E501 collection_formats = {} @@ -494,8 +492,8 @@ def save_role_using_post_with_http_info(self, role, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'role' in params: - body_params = params['role'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 diff --git a/tb_rest_client/api/api_pe/rpc_controller_api.py b/tb_rest_client/api/api_pe/rpc_controller_api.py new file mode 100644 index 00000000..e23efdcd --- /dev/null +++ b/tb_rest_client/api/api_pe/rpc_controller_api.py @@ -0,0 +1,243 @@ +# 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 +""" + +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 RpcControllerApi(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 handle_one_way_device_rpc_request_using_post(self, body, device_id, **kwargs): # noqa: E501 + """handleOneWayDeviceRPCRequest # 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_one_way_device_rpc_request_using_post(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (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.handle_one_way_device_rpc_request_using_post_with_http_info(body, device_id, **kwargs) # noqa: E501 + else: + (data) = self.handle_one_way_device_rpc_request_using_post_with_http_info(body, device_id, **kwargs) # noqa: E501 + return data + + def handle_one_way_device_rpc_request_using_post_with_http_info(self, body, device_id, **kwargs): # noqa: E501 + """handleOneWayDeviceRPCRequest # 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_one_way_device_rpc_request_using_post_with_http_info(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (required) + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', '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 handle_one_way_device_rpc_request_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `handle_one_way_device_rpc_request_using_post`") # noqa: E501 + # 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 `handle_one_way_device_rpc_request_using_post`") # 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 + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # 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/plugins/rpc/oneway/{deviceId}', '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_two_way_device_rpc_request_using_post(self, body, device_id, **kwargs): # noqa: E501 + """handleTwoWayDeviceRPCRequest # 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_two_way_device_rpc_request_using_post(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (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.handle_two_way_device_rpc_request_using_post_with_http_info(body, device_id, **kwargs) # noqa: E501 + else: + (data) = self.handle_two_way_device_rpc_request_using_post_with_http_info(body, device_id, **kwargs) # noqa: E501 + return data + + def handle_two_way_device_rpc_request_using_post_with_http_info(self, body, device_id, **kwargs): # noqa: E501 + """handleTwoWayDeviceRPCRequest # 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_two_way_device_rpc_request_using_post_with_http_info(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (required) + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', '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 handle_two_way_device_rpc_request_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `handle_two_way_device_rpc_request_using_post`") # noqa: E501 + # 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 `handle_two_way_device_rpc_request_using_post`") # 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 + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # 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/plugins/rpc/twoway/{deviceId}', '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) 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 new file mode 100644 index 00000000..53f65b5e --- /dev/null +++ b/tb_rest_client/api/api_pe/rpc_v_2_controller_api.py @@ -0,0 +1,554 @@ +# 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 +""" + +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 RpcV2ControllerApi(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_resource_using_delete(self, rpc_id, **kwargs): # noqa: E501 + """deleteResource # 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: rpcId (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 + """deleteResource # 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: rpcId (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 + # 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 get_persisted_rpc_by_device_using_get(self, device_id, page_size, page, rpc_status, **kwargs): # noqa: E501 + """getPersistedRpcByDevice # noqa: 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) + >>> result = thread.get() + + :param async_req bool + :param str device_id: deviceId (required) + :param int page_size: pageSize (required) + :param int page: page (required) + :param str rpc_status: rpcStatus (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :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_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, rpc_status, **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 + return data + + def get_persisted_rpc_by_device_using_get_with_http_info(self, device_id, page_size, page, rpc_status, **kwargs): # noqa: E501 + """getPersistedRpcByDevice # noqa: 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) + >>> result = thread.get() + + :param async_req bool + :param str device_id: deviceId (required) + :param int page_size: pageSize (required) + :param int page: page (required) + :param str rpc_status: rpcStatus (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['device_id', 'page_size', 'page', 'rpc_status', '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_persisted_rpc_by_device_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_persisted_rpc_by_device_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_persisted_rpc_by_device_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_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 = {} + + path_params = {} + if 'device_id' in params: + path_params['deviceId'] = params['device_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 'rpc_status' in params: + query_params.append(('rpcStatus', params['rpc_status'])) # 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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/rpc/persistent/device/{deviceId}{?pageSize,page,rpcStatus,textSearch,sortProperty,sortOrder}', '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_persisted_rpc_using_get(self, rpc_id, **kwargs): # noqa: E501 + """getPersistedRpc # noqa: 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_using_get(rpc_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str rpc_id: rpcId (required) + :return: Rpc + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_persisted_rpc_using_get_with_http_info(rpc_id, **kwargs) # noqa: E501 + else: + (data) = self.get_persisted_rpc_using_get_with_http_info(rpc_id, **kwargs) # noqa: E501 + return data + + def get_persisted_rpc_using_get_with_http_info(self, rpc_id, **kwargs): # noqa: E501 + """getPersistedRpc # noqa: 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_using_get_with_http_info(rpc_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str rpc_id: rpcId (required) + :return: Rpc + 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 get_persisted_rpc_using_get" % 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 `get_persisted_rpc_using_get`") # 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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/rpc/persistent/{rpcId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Rpc', # 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_one_way_device_rpc_request_using_post1(self, body, device_id, **kwargs): # noqa: E501 + """handleOneWayDeviceRPCRequest # 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_one_way_device_rpc_request_using_post1(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (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.handle_one_way_device_rpc_request_using_post1_with_http_info(body, device_id, **kwargs) # noqa: E501 + else: + (data) = self.handle_one_way_device_rpc_request_using_post1_with_http_info(body, device_id, **kwargs) # noqa: E501 + return data + + def handle_one_way_device_rpc_request_using_post1_with_http_info(self, body, device_id, **kwargs): # noqa: E501 + """handleOneWayDeviceRPCRequest # 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_one_way_device_rpc_request_using_post1_with_http_info(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (required) + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', '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 handle_one_way_device_rpc_request_using_post1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `handle_one_way_device_rpc_request_using_post1`") # noqa: E501 + # 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 `handle_one_way_device_rpc_request_using_post1`") # 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 + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # 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/rpc/oneway/{deviceId}', '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_two_way_device_rpc_request_using_post1(self, body, device_id, **kwargs): # noqa: E501 + """handleTwoWayDeviceRPCRequest # 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_two_way_device_rpc_request_using_post1(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (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.handle_two_way_device_rpc_request_using_post1_with_http_info(body, device_id, **kwargs) # noqa: E501 + else: + (data) = self.handle_two_way_device_rpc_request_using_post1_with_http_info(body, device_id, **kwargs) # noqa: E501 + return data + + def handle_two_way_device_rpc_request_using_post1_with_http_info(self, body, device_id, **kwargs): # noqa: E501 + """handleTwoWayDeviceRPCRequest # 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_two_way_device_rpc_request_using_post1_with_http_info(body, device_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str body: requestBody (required) + :param str device_id: deviceId (required) + :return: DeferredResultResponseEntity + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', '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 handle_two_way_device_rpc_request_using_post1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `handle_two_way_device_rpc_request_using_post1`") # noqa: E501 + # 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 `handle_two_way_device_rpc_request_using_post1`") # 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 + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # 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/rpc/twoway/{deviceId}', '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) 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 c5b1c9cb..bfe9bdce 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class RuleEngineControllerApi(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 """ @@ -34,43 +32,43 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def handle_rule_engine_request_using_post(self, request_body, **kwargs): # noqa: E501 + def handle_rule_engine_request_using_post(self, body, **kwargs): # noqa: E501 """handleRuleEngineRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.handle_rule_engine_request_using_post(request_body, async_req=True) + >>> thread = api.handle_rule_engine_request_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str request_body: requestBody (required) + :param str body: requestBody (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.handle_rule_engine_request_using_post_with_http_info(request_body, **kwargs) # noqa: E501 + return self.handle_rule_engine_request_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.handle_rule_engine_request_using_post_with_http_info(request_body, **kwargs) # noqa: E501 + (data) = self.handle_rule_engine_request_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def handle_rule_engine_request_using_post_with_http_info(self, request_body, **kwargs): # noqa: E501 + def handle_rule_engine_request_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """handleRuleEngineRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.handle_rule_engine_request_using_post_with_http_info(request_body, async_req=True) + >>> thread = api.handle_rule_engine_request_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param str request_body: requestBody (required) + :param str body: requestBody (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['request_body'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -78,13 +76,17 @@ def handle_rule_engine_request_using_post_with_http_info(self, request_body, **k 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_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'request_body' is set - if ('request_body' not in params or - params['request_body'] is None): - raise ValueError("Missing the required parameter `request_body` when calling `handle_rule_engine_request_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `handle_rule_engine_request_using_post`") # noqa: E501 collection_formats = {} @@ -98,8 +100,8 @@ def handle_rule_engine_request_using_post_with_http_info(self, request_body, **k local_var_files = {} body_params = None - if 'request_body' in params: - body_params = params['request_body'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -127,49 +129,49 @@ def handle_rule_engine_request_using_post_with_http_info(self, request_body, **k _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def handle_rule_engine_request_using_post1(self, entity_type, entity_id, timeout, request_body, **kwargs): # noqa: E501 + def handle_rule_engine_request_using_post1(self, body, entity_type, entity_id, timeout, **kwargs): # noqa: E501 """handleRuleEngineRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.handle_rule_engine_request_using_post1(entity_type, entity_id, timeout, request_body, async_req=True) + >>> thread = api.handle_rule_engine_request_using_post1(body, entity_type, entity_id, timeout, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: requestBody (required) :param str entity_type: entityType (required) :param str entity_id: entityId (required) :param int timeout: timeout (required) - :param str request_body: requestBody (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.handle_rule_engine_request_using_post1_with_http_info(entity_type, entity_id, timeout, request_body, **kwargs) # noqa: E501 + return self.handle_rule_engine_request_using_post1_with_http_info(body, entity_type, entity_id, timeout, **kwargs) # noqa: E501 else: - (data) = self.handle_rule_engine_request_using_post1_with_http_info(entity_type, entity_id, timeout, request_body, **kwargs) # noqa: E501 + (data) = self.handle_rule_engine_request_using_post1_with_http_info(body, entity_type, entity_id, timeout, **kwargs) # noqa: E501 return data - def handle_rule_engine_request_using_post1_with_http_info(self, entity_type, entity_id, timeout, request_body, **kwargs): # noqa: E501 + def handle_rule_engine_request_using_post1_with_http_info(self, body, entity_type, entity_id, timeout, **kwargs): # noqa: E501 """handleRuleEngineRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.handle_rule_engine_request_using_post1_with_http_info(entity_type, entity_id, timeout, request_body, async_req=True) + >>> thread = api.handle_rule_engine_request_using_post1_with_http_info(body, entity_type, entity_id, timeout, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: requestBody (required) :param str entity_type: entityType (required) :param str entity_id: entityId (required) :param int timeout: timeout (required) - :param str request_body: requestBody (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'timeout', 'request_body'] # noqa: E501 + all_params = ['body', 'entity_type', 'entity_id', 'timeout'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -177,9 +179,17 @@ def handle_rule_engine_request_using_post1_with_http_info(self, entity_type, ent 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 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `handle_rule_engine_request_using_post1`") # noqa: E501 # verify the required parameter 'entity_type' is set if ('entity_type' not in params or params['entity_type'] is None): @@ -192,10 +202,6 @@ def handle_rule_engine_request_using_post1_with_http_info(self, entity_type, ent 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 - # verify the required parameter 'request_body' is set - if ('request_body' not in params or - params['request_body'] is None): - raise ValueError("Missing the required parameter `request_body` when calling `handle_rule_engine_request_using_post1`") # noqa: E501 collection_formats = {} @@ -215,8 +221,8 @@ def handle_rule_engine_request_using_post1_with_http_info(self, entity_type, ent local_var_files = {} body_params = None - if 'request_body' in params: - body_params = params['request_body'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -244,47 +250,47 @@ 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, entity_type, entity_id, request_body, **kwargs): # noqa: E501 + def handle_rule_engine_request_using_post2(self, body, entity_type, entity_id, **kwargs): # noqa: E501 """handleRuleEngineRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.handle_rule_engine_request_using_post2(entity_type, entity_id, request_body, async_req=True) + >>> thread = api.handle_rule_engine_request_using_post2(body, entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: requestBody (required) :param str entity_type: entityType (required) :param str entity_id: entityId (required) - :param str request_body: requestBody (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.handle_rule_engine_request_using_post2_with_http_info(entity_type, entity_id, request_body, **kwargs) # noqa: E501 + return self.handle_rule_engine_request_using_post2_with_http_info(body, entity_type, entity_id, **kwargs) # noqa: E501 else: - (data) = self.handle_rule_engine_request_using_post2_with_http_info(entity_type, entity_id, request_body, **kwargs) # noqa: E501 + (data) = self.handle_rule_engine_request_using_post2_with_http_info(body, entity_type, entity_id, **kwargs) # noqa: E501 return data - def handle_rule_engine_request_using_post2_with_http_info(self, entity_type, entity_id, request_body, **kwargs): # noqa: E501 + def handle_rule_engine_request_using_post2_with_http_info(self, body, entity_type, entity_id, **kwargs): # noqa: E501 """handleRuleEngineRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.handle_rule_engine_request_using_post2_with_http_info(entity_type, entity_id, request_body, async_req=True) + >>> thread = api.handle_rule_engine_request_using_post2_with_http_info(body, entity_type, entity_id, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: requestBody (required) :param str entity_type: entityType (required) :param str entity_id: entityId (required) - :param str request_body: requestBody (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['entity_type', 'entity_id', 'request_body'] # noqa: E501 + all_params = ['body', 'entity_type', 'entity_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -292,9 +298,17 @@ def handle_rule_engine_request_using_post2_with_http_info(self, entity_type, ent 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_post2" % key + ) params[key] = val del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `handle_rule_engine_request_using_post2`") # noqa: E501 # verify the required parameter 'entity_type' is set if ('entity_type' not in params or params['entity_type'] is None): @@ -303,10 +317,6 @@ def handle_rule_engine_request_using_post2_with_http_info(self, entity_type, ent 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_post2`") # noqa: E501 - # verify the required parameter 'request_body' is set - if ('request_body' not in params or - params['request_body'] is None): - raise ValueError("Missing the required parameter `request_body` when calling `handle_rule_engine_request_using_post2`") # noqa: E501 collection_formats = {} @@ -324,8 +334,8 @@ def handle_rule_engine_request_using_post2_with_http_info(self, entity_type, ent local_var_files = {} body_params = None - if 'request_body' in params: - body_params = params['request_body'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 b0a3e3ed..69142446 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class SchedulerEventControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -34,12 +32,113 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def assign_scheduler_event_to_edge_using_post(self, edge_id, scheduler_event_id, **kwargs): # noqa: E501 + """assignSchedulerEventToEdge # 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_scheduler_event_to_edge_using_post(edge_id, scheduler_event_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str scheduler_event_id: schedulerEventId (required) + :return: SchedulerEventInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.assign_scheduler_event_to_edge_using_post_with_http_info(edge_id, scheduler_event_id, **kwargs) # noqa: E501 + else: + (data) = self.assign_scheduler_event_to_edge_using_post_with_http_info(edge_id, scheduler_event_id, **kwargs) # noqa: E501 + return data + + def assign_scheduler_event_to_edge_using_post_with_http_info(self, edge_id, scheduler_event_id, **kwargs): # noqa: E501 + """assignSchedulerEventToEdge # 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_scheduler_event_to_edge_using_post_with_http_info(edge_id, scheduler_event_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str scheduler_event_id: schedulerEventId (required) + :return: SchedulerEventInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_id', 'scheduler_event_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_scheduler_event_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 `assign_scheduler_event_to_edge_using_post`") # noqa: E501 + # verify the required parameter 'scheduler_event_id' is set + if ('scheduler_event_id' not in params or + params['scheduler_event_id'] is None): + raise ValueError("Missing the required parameter `scheduler_event_id` when calling `assign_scheduler_event_to_edge_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + if 'scheduler_event_id' in params: + path_params['schedulerEventId'] = params['scheduler_event_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SchedulerEventInfo', # 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_scheduler_event_using_delete(self, scheduler_event_id, **kwargs): # noqa: E501 """deleteSchedulerEvent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_scheduler_event_using_delete(scheduler_event_id, async_req=True) + >>> thread = api.delete_scheduler_event_using_delete(scheduler_event_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -60,7 +159,7 @@ def delete_scheduler_event_using_delete_with_http_info(self, scheduler_event_id, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_scheduler_event_using_delete_with_http_info(scheduler_event_id, async_req=True) + >>> thread = api.delete_scheduler_event_using_delete_with_http_info(scheduler_event_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -78,7 +177,11 @@ def delete_scheduler_event_using_delete_with_http_info(self, scheduler_event_id, 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_scheduler_event_using_delete" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'scheduler_event_id' is set @@ -99,27 +202,233 @@ def delete_scheduler_event_using_delete_with_http_info(self, scheduler_event_id, form_params = [] local_var_files = {} + body_params = None + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/schedulerEvent/{schedulerEventId}', '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_all_scheduler_events_using_get(self, edge_id, **kwargs): # noqa: E501 + """getAllSchedulerEvents # noqa: 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_scheduler_events_using_get(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :return: list[SchedulerEventInfo] + 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_scheduler_events_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + else: + (data) = self.get_all_scheduler_events_using_get_with_http_info(edge_id, **kwargs) # noqa: E501 + return data + + def get_all_scheduler_events_using_get_with_http_info(self, edge_id, **kwargs): # noqa: E501 + """getAllSchedulerEvents # noqa: 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_scheduler_events_using_get_with_http_info(edge_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :return: list[SchedulerEventInfo] + 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_all_scheduler_events_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_all_scheduler_events_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( ['*/*']) # 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/{edgeId}/allSchedulerEvents', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SchedulerEventInfo]', # 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_scheduler_events_using_get(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """getEdgeSchedulerEvents # noqa: 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_scheduler_events_using_get(edge_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataSchedulerEventInfo + 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_scheduler_events_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_edge_scheduler_events_using_get_with_http_info(edge_id, page_size, page, **kwargs) # noqa: E501 + return data + + def get_edge_scheduler_events_using_get_with_http_info(self, edge_id, page_size, page, **kwargs): # noqa: E501 + """getEdgeSchedulerEvents # noqa: 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_scheduler_events_using_get_with_http_info(edge_id, page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataSchedulerEventInfo + If the method is called asynchronously, + returns the request thread. + """ + + 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') + 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_scheduler_events_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_scheduler_events_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_scheduler_events_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_scheduler_events_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + + query_params = [] + 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 '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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 # Authentication setting auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/schedulerEvent/{schedulerEventId}', 'DELETE', + '/api/edge/{edgeId}/schedulerEvents{?textSearch,sortProperty,sortOrder,pageSize,page}', '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='PageDataSchedulerEventInfo', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -132,7 +441,7 @@ def get_scheduler_event_by_id_using_get(self, scheduler_event_id, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_scheduler_event_by_id_using_get(scheduler_event_id, async_req=True) + >>> thread = api.get_scheduler_event_by_id_using_get(scheduler_event_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -153,7 +462,7 @@ def get_scheduler_event_by_id_using_get_with_http_info(self, scheduler_event_id, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_scheduler_event_by_id_using_get_with_http_info(scheduler_event_id, async_req=True) + >>> thread = api.get_scheduler_event_by_id_using_get_with_http_info(scheduler_event_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -171,7 +480,11 @@ def get_scheduler_event_by_id_using_get_with_http_info(self, scheduler_event_id, 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_scheduler_event_by_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'scheduler_event_id' is set @@ -197,10 +510,6 @@ def get_scheduler_event_by_id_using_get_with_http_info(self, scheduler_event_id, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -225,7 +534,7 @@ def get_scheduler_event_info_by_id_using_get(self, scheduler_event_id, **kwargs) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_scheduler_event_info_by_id_using_get(scheduler_event_id, async_req=True) + >>> thread = api.get_scheduler_event_info_by_id_using_get(scheduler_event_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -246,7 +555,7 @@ def get_scheduler_event_info_by_id_using_get_with_http_info(self, scheduler_even This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_scheduler_event_info_by_id_using_get_with_http_info(scheduler_event_id, async_req=True) + >>> thread = api.get_scheduler_event_info_by_id_using_get_with_http_info(scheduler_event_id, async_req=True) >>> result = thread.get() :param async_req bool @@ -264,7 +573,11 @@ def get_scheduler_event_info_by_id_using_get_with_http_info(self, scheduler_even 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_scheduler_event_info_by_id_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'scheduler_event_id' is set @@ -290,10 +603,6 @@ def get_scheduler_event_info_by_id_using_get_with_http_info(self, scheduler_even header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -318,7 +627,7 @@ def get_scheduler_events_by_ids_using_get(self, scheduler_event_ids, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_scheduler_events_by_ids_using_get(scheduler_event_ids, async_req=True) + >>> thread = api.get_scheduler_events_by_ids_using_get(scheduler_event_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -339,7 +648,7 @@ def get_scheduler_events_by_ids_using_get_with_http_info(self, scheduler_event_i This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_scheduler_events_by_ids_using_get_with_http_info(scheduler_event_ids, async_req=True) + >>> thread = api.get_scheduler_events_by_ids_using_get_with_http_info(scheduler_event_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -357,7 +666,11 @@ def get_scheduler_events_by_ids_using_get_with_http_info(self, scheduler_event_i 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_scheduler_events_by_ids_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'scheduler_event_ids' is set @@ -383,10 +696,6 @@ def get_scheduler_events_by_ids_using_get_with_http_info(self, scheduler_event_i header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -411,7 +720,7 @@ def get_scheduler_events_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_scheduler_events_using_get(async_req=True) + >>> thread = api.get_scheduler_events_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -432,7 +741,7 @@ def get_scheduler_events_using_get_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_scheduler_events_using_get_with_http_info(async_req=True) + >>> thread = api.get_scheduler_events_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -450,7 +759,11 @@ def get_scheduler_events_using_get_with_http_info(self, **kwargs): # noqa: E501 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_scheduler_events_using_get" % key + ) params[key] = val del params['kwargs'] @@ -472,10 +785,6 @@ def get_scheduler_events_using_get_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -495,43 +804,43 @@ def get_scheduler_events_using_get_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_scheduler_event_using_post(self, scheduler_event, **kwargs): # noqa: E501 + def save_scheduler_event_using_post(self, body, **kwargs): # noqa: E501 """saveSchedulerEvent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_scheduler_event_using_post(scheduler_event, async_req=True) + >>> thread = api.save_scheduler_event_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param SchedulerEvent scheduler_event: schedulerEvent (required) + :param SchedulerEvent body: schedulerEvent (required) :return: SchedulerEvent If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_scheduler_event_using_post_with_http_info(scheduler_event, **kwargs) # noqa: E501 + return self.save_scheduler_event_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_scheduler_event_using_post_with_http_info(scheduler_event, **kwargs) # noqa: E501 + (data) = self.save_scheduler_event_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_scheduler_event_using_post_with_http_info(self, scheduler_event, **kwargs): # noqa: E501 + def save_scheduler_event_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveSchedulerEvent # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_scheduler_event_using_post_with_http_info(scheduler_event, async_req=True) + >>> thread = api.save_scheduler_event_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param SchedulerEvent scheduler_event: schedulerEvent (required) + :param SchedulerEvent body: schedulerEvent (required) :return: SchedulerEvent If the method is called asynchronously, returns the request thread. """ - all_params = ['scheduler_event'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -539,13 +848,17 @@ def save_scheduler_event_using_post_with_http_info(self, scheduler_event, **kwar 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_scheduler_event_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'scheduler_event' is set - if ('scheduler_event' not in params or - params['scheduler_event'] is None): - raise ValueError("Missing the required parameter `scheduler_event` when calling `save_scheduler_event_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_scheduler_event_using_post`") # noqa: E501 collection_formats = {} @@ -559,8 +872,8 @@ def save_scheduler_event_using_post_with_http_info(self, scheduler_event, **kwar local_var_files = {} body_params = None - if 'scheduler_event' in params: - body_params = params['scheduler_event'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -587,3 +900,104 @@ def save_scheduler_event_using_post_with_http_info(self, scheduler_event, **kwar _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def unassign_scheduler_event_from_edge_using_delete(self, edge_id, scheduler_event_id, **kwargs): # noqa: E501 + """unassignSchedulerEventFromEdge # 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_scheduler_event_from_edge_using_delete(edge_id, scheduler_event_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str scheduler_event_id: schedulerEventId (required) + :return: SchedulerEventInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.unassign_scheduler_event_from_edge_using_delete_with_http_info(edge_id, scheduler_event_id, **kwargs) # noqa: E501 + else: + (data) = self.unassign_scheduler_event_from_edge_using_delete_with_http_info(edge_id, scheduler_event_id, **kwargs) # noqa: E501 + return data + + def unassign_scheduler_event_from_edge_using_delete_with_http_info(self, edge_id, scheduler_event_id, **kwargs): # noqa: E501 + """unassignSchedulerEventFromEdge # 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_scheduler_event_from_edge_using_delete_with_http_info(edge_id, scheduler_event_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str edge_id: edgeId (required) + :param str scheduler_event_id: schedulerEventId (required) + :return: SchedulerEventInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['edge_id', 'scheduler_event_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_scheduler_event_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_scheduler_event_from_edge_using_delete`") # noqa: E501 + # verify the required parameter 'scheduler_event_id' is set + if ('scheduler_event_id' not in params or + params['scheduler_event_id'] is None): + raise ValueError("Missing the required parameter `scheduler_event_id` when calling `unassign_scheduler_event_from_edge_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'edge_id' in params: + path_params['edgeId'] = params['edge_id'] # noqa: E501 + if 'scheduler_event_id' in params: + path_params['schedulerEventId'] = params['scheduler_event_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SchedulerEventInfo', # 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/self_registration_controller_api.py b/tb_rest_client/api/api_pe/self_registration_controller_api.py index 7c0735ae..54727b8e 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -26,6 +22,8 @@ class SelfRegistrationControllerApi(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 """ @@ -39,7 +37,7 @@ def get_privacy_policy_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_privacy_policy_using_get(async_req=True) + >>> thread = api.get_privacy_policy_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -59,7 +57,7 @@ def get_privacy_policy_using_get_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_privacy_policy_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 @@ -76,6 +74,11 @@ def get_privacy_policy_using_get_with_http_info(self, **kwargs): # noqa: E501 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_privacy_policy_using_get" % key + ) params[key] = val del params['kwargs'] @@ -95,10 +98,6 @@ def get_privacy_policy_using_get_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -123,7 +122,7 @@ def get_self_registration_params_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_self_registration_params_using_get(async_req=True) + >>> thread = api.get_self_registration_params_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -143,7 +142,7 @@ def get_self_registration_params_using_get_with_http_info(self, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_self_registration_params_using_get_with_http_info(async_req=True) + >>> thread = api.get_self_registration_params_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -160,6 +159,11 @@ def get_self_registration_params_using_get_with_http_info(self, **kwargs): # no 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_self_registration_params_using_get" % key + ) params[key] = val del params['kwargs'] @@ -179,10 +183,6 @@ def get_self_registration_params_using_get_with_http_info(self, **kwargs): # no 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 @@ -207,10 +207,11 @@ def get_sign_up_self_registration_params_using_get(self, **kwargs): # noqa: E50 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_sign_up_self_registration_params_using_get(async_req=True) + >>> thread = api.get_sign_up_self_registration_params_using_get(async_req=True) >>> result = thread.get() :param async_req bool + :param str pkg_name: pkgName :return: SignUpSelfRegistrationParams If the method is called asynchronously, returns the request thread. @@ -227,16 +228,17 @@ def get_sign_up_self_registration_params_using_get_with_http_info(self, **kwargs This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_sign_up_self_registration_params_using_get_with_http_info(async_req=True) + >>> thread = api.get_sign_up_self_registration_params_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool + :param str pkg_name: pkgName :return: SignUpSelfRegistrationParams If the method is called asynchronously, returns the request thread. """ - all_params = [] # 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') @@ -244,6 +246,11 @@ def get_sign_up_self_registration_params_using_get_with_http_info(self, **kwargs 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_sign_up_self_registration_params_using_get" % key + ) params[key] = val del params['kwargs'] @@ -252,6 +259,8 @@ def get_sign_up_self_registration_params_using_get_with_http_info(self, **kwargs path_params = {} query_params = [] + if 'pkg_name' in params: + query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 header_params = {} @@ -263,15 +272,11 @@ def get_sign_up_self_registration_params_using_get_with_http_info(self, **kwargs 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/selfRegistration/signUpSelfRegistrationParams', 'GET', + '/api/noauth/selfRegistration/signUpSelfRegistrationParams{?pkgName}', 'GET', path_params, query_params, header_params, @@ -286,45 +291,43 @@ def get_sign_up_self_registration_params_using_get_with_http_info(self, **kwargs _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_self_registration_params_using_post(self, self_registration_params, **kwargs): # noqa: E501 + def save_self_registration_params_using_post(self, body, **kwargs): # noqa: E501 """saveSelfRegistrationParams # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_self_registration_params_using_post(self_registration_params, async_req=True) + >>> thread = api.save_self_registration_params_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param SelfRegistrationParams self_registration_params: selfRegistrationParams (required) + :param SelfRegistrationParams body: selfRegistrationParams (required) :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.save_self_registration_params_using_post_with_http_info(self_registration_params, - **kwargs) # noqa: E501 + return self.save_self_registration_params_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_self_registration_params_using_post_with_http_info(self_registration_params, - **kwargs) # noqa: E501 + (data) = self.save_self_registration_params_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_self_registration_params_using_post_with_http_info(self, self_registration_params, **kwargs): # noqa: E501 + def save_self_registration_params_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveSelfRegistrationParams # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_self_registration_params_using_post_with_http_info(self_registration_params, async_req=True) + >>> thread = api.save_self_registration_params_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param SelfRegistrationParams self_registration_params: selfRegistrationParams (required) + :param SelfRegistrationParams body: selfRegistrationParams (required) :return: SelfRegistrationParams If the method is called asynchronously, returns the request thread. """ - all_params = ['self_registration_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') @@ -332,13 +335,17 @@ def save_self_registration_params_using_post_with_http_info(self, self_registrat 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_self_registration_params_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'self_registration_params' is set - if ('self_registration_params' not in params or - params['self_registration_params'] is None): - raise ValueError( - "Missing the required parameter `self_registration_params` when calling `save_self_registration_params_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_self_registration_params_using_post`") # noqa: E501 collection_formats = {} @@ -352,8 +359,8 @@ def save_self_registration_params_using_post_with_http_info(self, self_registrat local_var_files = {} body_params = None - if 'self_registration_params' in params: - body_params = params['self_registration_params'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -380,89 +387,3 @@ def save_self_registration_params_using_post_with_http_info(self, self_registrat _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - - def get_terms_of_use_using_get(self, **kwargs): - """getTermsOfUse # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_terms_of_use_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_terms_of_use_using_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_terms_of_use_using_get_with_http_info(**kwargs) # noqa: E501 - return data - - def get_terms_of_use_using_get_with_http_info(self, **kwargs): - """getTermsOfUse # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_terms_of_use_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']): - 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( - ['*/*']) # 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/noauth/selfRegistration/termsOfUse', '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) diff --git a/tb_rest_client/api/api_pe/sig_fox_integration_controller_api.py b/tb_rest_client/api/api_pe/sig_fox_integration_controller_api.py index 9230e5b1..b17e2492 100644 --- a/tb_rest_client/api/api_pe/sig_fox_integration_controller_api.py +++ b/tb_rest_client/api/api_pe/sig_fox_integration_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class SigFoxIntegrationControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -34,47 +32,47 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def process_request_using_delete1(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_delete3(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_delete1(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_delete3(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_delete1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_delete3_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_delete1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_delete3_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_delete1_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_delete3_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_delete1_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_delete3_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -82,21 +80,25 @@ def process_request_using_delete1_with_http_info(self, routing_key, msg, request 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 process_request_using_delete3" % 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 `process_request_using_delete1`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_delete1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_delete3`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_delete1`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_delete3`") # 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 `process_request_using_delete3`") # noqa: E501 collection_formats = {} @@ -114,8 +116,8 @@ def process_request_using_delete1_with_http_info(self, routing_key, msg, request local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -143,47 +145,47 @@ def process_request_using_delete1_with_http_info(self, routing_key, msg, request _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_get1(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_get3(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_get1(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_get3(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_get1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_get3_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_get1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_get3_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_get1_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_get3_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_get1_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_get3_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -191,21 +193,25 @@ def process_request_using_get1_with_http_info(self, routing_key, msg, request_he 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 process_request_using_get3" % 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 `process_request_using_get1`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_get1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_get3`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_get1`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_get3`") # 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 `process_request_using_get3`") # noqa: E501 collection_formats = {} @@ -223,8 +229,8 @@ def process_request_using_get1_with_http_info(self, routing_key, msg, request_he local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -252,47 +258,47 @@ def process_request_using_get1_with_http_info(self, routing_key, msg, request_he _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_head1(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_head3(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_head1(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_head3(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_head1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_head3_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_head1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_head3_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_head1_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_head3_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_head1_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_head3_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -300,21 +306,25 @@ def process_request_using_head1_with_http_info(self, routing_key, msg, request_h 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 process_request_using_head3" % 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 `process_request_using_head1`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_head1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_head3`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_head1`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_head3`") # 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 `process_request_using_head3`") # noqa: E501 collection_formats = {} @@ -332,8 +342,8 @@ def process_request_using_head1_with_http_info(self, routing_key, msg, request_h local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -361,47 +371,47 @@ def process_request_using_head1_with_http_info(self, routing_key, msg, request_h _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_options1(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_options3(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_options1(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_options3(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_options1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_options3_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_options1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_options3_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_options1_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_options3_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_options1_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_options3_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -409,21 +419,25 @@ def process_request_using_options1_with_http_info(self, routing_key, msg, reques 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 process_request_using_options3" % 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 `process_request_using_options1`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_options1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_options3`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_options1`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_options3`") # 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 `process_request_using_options3`") # noqa: E501 collection_formats = {} @@ -441,8 +455,8 @@ def process_request_using_options1_with_http_info(self, routing_key, msg, reques local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -470,47 +484,47 @@ def process_request_using_options1_with_http_info(self, routing_key, msg, reques _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_patch1(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_patch3(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_patch1(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_patch3(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_patch1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_patch3_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_patch1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_patch3_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_patch1_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_patch3_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_patch1_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_patch3_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -518,21 +532,25 @@ def process_request_using_patch1_with_http_info(self, routing_key, msg, request_ 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 process_request_using_patch3" % 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 `process_request_using_patch1`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_patch1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_patch3`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_patch1`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_patch3`") # 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 `process_request_using_patch3`") # noqa: E501 collection_formats = {} @@ -550,8 +568,8 @@ def process_request_using_patch1_with_http_info(self, routing_key, msg, request_ local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -579,47 +597,47 @@ def process_request_using_patch1_with_http_info(self, routing_key, msg, request_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_post5(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_post11(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_post5(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_post11(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_post5_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_post11_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_post5_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_post11_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_post5_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_post11_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_post5_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_post11_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -627,21 +645,25 @@ def process_request_using_post5_with_http_info(self, routing_key, msg, request_h 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 process_request_using_post11" % 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 `process_request_using_post5`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_post5`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_post11`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post5`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post11`") # 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 `process_request_using_post11`") # noqa: E501 collection_formats = {} @@ -659,8 +681,8 @@ def process_request_using_post5_with_http_info(self, routing_key, msg, request_h local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -688,47 +710,47 @@ def process_request_using_post5_with_http_info(self, routing_key, msg, request_h _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_put1(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_put3(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_put1(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_put3(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_put1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_put3_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_put1_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_put3_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_put1_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_put3_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_put1_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_put3_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -736,21 +758,25 @@ def process_request_using_put1_with_http_info(self, routing_key, msg, request_he 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 process_request_using_put3" % 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 `process_request_using_put1`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_put1`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_put3`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_put1`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_put3`") # 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 `process_request_using_put3`") # noqa: E501 collection_formats = {} @@ -768,8 +794,8 @@ def process_request_using_put1_with_http_info(self, routing_key, msg, request_he local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 e825fa84..ff521799 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class SignUpControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def accept_privacy_policy_using_post(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.accept_privacy_policy_using_post(async_req=True) + >>> thread = api.accept_privacy_policy_using_post(async_req=True) >>> result = thread.get() :param async_req bool @@ -59,7 +57,7 @@ def accept_privacy_policy_using_post_with_http_info(self, **kwargs): # noqa: E5 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.accept_privacy_policy_using_post_with_http_info(async_req=True) + >>> thread = api.accept_privacy_policy_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -76,7 +74,11 @@ def accept_privacy_policy_using_post_with_http_info(self, **kwargs): # noqa: E5 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'] @@ -96,10 +98,6 @@ def accept_privacy_policy_using_post_with_http_info(self, **kwargs): # noqa: E5 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -124,11 +122,12 @@ def activate_email_using_get(self, email_code, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.activate_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 pkg_name: pkgName :return: str If the method is called asynchronously, returns the request thread. @@ -145,17 +144,18 @@ def activate_email_using_get_with_http_info(self, email_code, **kwargs): # noqa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.activate_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 pkg_name: pkgName :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') @@ -163,7 +163,11 @@ def activate_email_using_get_with_http_info(self, email_code, **kwargs): # noqa 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 @@ -176,6 +180,8 @@ def activate_email_using_get_with_http_info(self, email_code, **kwargs): # noqa path_params = {} query_params = [] + if 'pkg_name' in params: + query_params.append(('pkgName', params['pkg_name'])) # noqa: E501 if 'email_code' in params: query_params.append(('emailCode', params['email_code'])) # noqa: E501 @@ -189,15 +195,11 @@ def activate_email_using_get_with_http_info(self, email_code, **kwargs): # noqa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/activateEmail{?emailCode}', 'GET', + '/api/noauth/activateEmail{?pkgName,emailCode}', 'GET', path_params, query_params, header_params, @@ -217,11 +219,12 @@ def activate_user_by_email_code_using_post(self, email_code, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.activate_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) + :param str pkg_name: pkgName :return: str If the method is called asynchronously, returns the request thread. @@ -238,17 +241,18 @@ def activate_user_by_email_code_using_post_with_http_info(self, email_code, **kw This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.activate_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) + :param str pkg_name: pkgName :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') @@ -256,7 +260,11 @@ def activate_user_by_email_code_using_post_with_http_info(self, email_code, **kw 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 @@ -271,6 +279,8 @@ def activate_user_by_email_code_using_post_with_http_info(self, email_code, **kw 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 = {} @@ -282,15 +292,11 @@ def activate_user_by_email_code_using_post_with_http_info(self, email_code, **kw header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/activateByEmailCode{?emailCode}', 'POST', + '/api/noauth/activateByEmailCode{?emailCode,pkgName}', 'POST', path_params, query_params, header_params, @@ -310,7 +316,7 @@ def delete_tenant_account_using_delete(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_tenant_account_using_delete(async_req=True) + >>> thread = api.delete_tenant_account_using_delete(async_req=True) >>> result = thread.get() :param async_req bool @@ -330,7 +336,7 @@ def delete_tenant_account_using_delete_with_http_info(self, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_tenant_account_using_delete_with_http_info(async_req=True) + >>> thread = api.delete_tenant_account_using_delete_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -347,7 +353,11 @@ def delete_tenant_account_using_delete_with_http_info(self, **kwargs): # noqa: 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'] @@ -363,14 +373,6 @@ def delete_tenant_account_using_delete_with_http_info(self, **kwargs): # noqa: local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -395,7 +397,7 @@ def get_recaptcha_public_key_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_recaptcha_public_key_using_get(async_req=True) + >>> thread = api.get_recaptcha_public_key_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -415,7 +417,7 @@ def get_recaptcha_public_key_using_get_with_http_info(self, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_recaptcha_public_key_using_get_with_http_info(async_req=True) + >>> thread = api.get_recaptcha_public_key_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -432,7 +434,11 @@ def get_recaptcha_public_key_using_get_with_http_info(self, **kwargs): # noqa: 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'] @@ -452,10 +458,6 @@ def get_recaptcha_public_key_using_get_with_http_info(self, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -480,7 +482,7 @@ def is_display_welcome_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.is_display_welcome_using_get(async_req=True) + >>> thread = api.is_display_welcome_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -500,7 +502,7 @@ def is_display_welcome_using_get_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.is_display_welcome_using_get_with_http_info(async_req=True) + >>> thread = api.is_display_welcome_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -517,7 +519,11 @@ def is_display_welcome_using_get_with_http_info(self, **kwargs): # noqa: E501 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'] @@ -537,10 +543,6 @@ def is_display_welcome_using_get_with_http_info(self, **kwargs): # noqa: E501 header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -560,12 +562,105 @@ def is_display_welcome_using_get_with_http_info(self, **kwargs): # noqa: E501 _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( + ['*/*']) # 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_pe.privacy_policy_accepted_using_get(async_req=True) + >>> thread = api.privacy_policy_accepted_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -585,7 +680,7 @@ def privacy_policy_accepted_using_get_with_http_info(self, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.privacy_policy_accepted_using_get_with_http_info(async_req=True) + >>> thread = api.privacy_policy_accepted_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -602,7 +697,11 @@ def privacy_policy_accepted_using_get_with_http_info(self, **kwargs): # noqa: E 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'] @@ -622,10 +721,6 @@ def privacy_policy_accepted_using_get_with_http_info(self, **kwargs): # noqa: E header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -650,11 +745,12 @@ def resend_email_activation_using_post(self, email, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.resend_email_activation_using_post(email, 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. @@ -671,17 +767,18 @@ def resend_email_activation_using_post_with_http_info(self, email, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.resend_email_activation_using_post_with_http_info(email, 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'] # 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') @@ -689,7 +786,11 @@ def resend_email_activation_using_post_with_http_info(self, email, **kwargs): # 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 @@ -704,6 +805,8 @@ def resend_email_activation_using_post_with_http_info(self, email, **kwargs): # 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 = {} @@ -711,19 +814,11 @@ def resend_email_activation_using_post_with_http_info(self, email, **kwargs): # local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/resendEmailActivation{?email}', 'POST', + '/api/noauth/resendEmailActivation{?email,pkgName}', 'POST', path_params, query_params, header_params, @@ -743,7 +838,7 @@ def set_not_display_welcome_using_post(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.set_not_display_welcome_using_post(async_req=True) + >>> thread = api.set_not_display_welcome_using_post(async_req=True) >>> result = thread.get() :param async_req bool @@ -763,7 +858,7 @@ def set_not_display_welcome_using_post_with_http_info(self, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.set_not_display_welcome_using_post_with_http_info(async_req=True) + >>> thread = api.set_not_display_welcome_using_post_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -780,7 +875,11 @@ def set_not_display_welcome_using_post_with_http_info(self, **kwargs): # noqa: 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'] @@ -796,14 +895,6 @@ def set_not_display_welcome_using_post_with_http_info(self, **kwargs): # noqa: local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -823,43 +914,43 @@ def set_not_display_welcome_using_post_with_http_info(self, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def sign_up_using_post(self, sign_up_request, **kwargs): # noqa: E501 + def sign_up_using_post(self, body, **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_pe.sign_up_using_post(sign_up_request, async_req=True) + >>> thread = api.sign_up_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param SignUpRequest sign_up_request: signUpRequest (required) + :param SignUpRequest body: signUpRequest (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.sign_up_using_post_with_http_info(sign_up_request, **kwargs) # noqa: E501 + return self.sign_up_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.sign_up_using_post_with_http_info(sign_up_request, **kwargs) # noqa: E501 + (data) = self.sign_up_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def sign_up_using_post_with_http_info(self, sign_up_request, **kwargs): # noqa: E501 + def sign_up_using_post_with_http_info(self, body, **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_pe.sign_up_using_post_with_http_info(sign_up_request, async_req=True) + >>> thread = api.sign_up_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param SignUpRequest sign_up_request: signUpRequest (required) + :param SignUpRequest body: signUpRequest (required) :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['sign_up_request'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -867,13 +958,17 @@ def sign_up_using_post_with_http_info(self, sign_up_request, **kwargs): # noqa: 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'] - # verify the required parameter 'sign_up_request' is set - if ('sign_up_request' not in params or - params['sign_up_request'] is None): - raise ValueError("Missing the required parameter `sign_up_request` when calling `sign_up_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `sign_up_using_post`") # noqa: E501 collection_formats = {} @@ -887,8 +982,8 @@ def sign_up_using_post_with_http_info(self, sign_up_request, **kwargs): # noqa: local_var_files = {} body_params = None - if 'sign_up_request' in params: - body_params = params['sign_up_request'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 53ddd0d2..ef8e6073 100644 --- a/tb_rest_client/api/api_pe/solution_controller_api.py +++ b/tb_rest_client/api/api_pe/solution_controller_api.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -85,8 +84,8 @@ def delete_solution_template_using_delete_with_http_info(self, solution_template params[key] = val del params['kwargs'] # verify the required parameter 'solution_template_id' is set - if self.api_client.client_side_validation and ('solution_template_id' not in params or - params['solution_template_id'] is None): # noqa: E501 + if ('solution_template_id' not in params or + params['solution_template_id'] is None): raise ValueError("Missing the required parameter `solution_template_id` when calling `delete_solution_template_using_delete`") # noqa: E501 collection_formats = {} @@ -103,14 +102,6 @@ def delete_solution_template_using_delete_with_http_info(self, solution_template local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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 @@ -182,8 +173,8 @@ def get_solution_template_details_using_get_with_http_info(self, solution_templa params[key] = val del params['kwargs'] # verify the required parameter 'solution_template_id' is set - if self.api_client.client_side_validation and ('solution_template_id' not in params or - params['solution_template_id'] is None): # noqa: E501 + if ('solution_template_id' not in params or + params['solution_template_id'] is None): raise ValueError("Missing the required parameter `solution_template_id` when calling `get_solution_template_details_using_get`") # noqa: E501 collection_formats = {} @@ -204,10 +195,6 @@ def get_solution_template_details_using_get_with_http_info(self, solution_templa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -293,10 +280,6 @@ def get_solution_template_infos_using_get_with_http_info(self, **kwargs): # noq header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -368,8 +351,8 @@ def get_solution_template_instructions_using_get_with_http_info(self, solution_t params[key] = val del params['kwargs'] # verify the required parameter 'solution_template_id' is set - if self.api_client.client_side_validation and ('solution_template_id' not in params or - params['solution_template_id'] is None): # noqa: E501 + if ('solution_template_id' not in params or + params['solution_template_id'] is None): raise ValueError("Missing the required parameter `solution_template_id` when calling `get_solution_template_instructions_using_get`") # noqa: E501 collection_formats = {} @@ -390,10 +373,6 @@ def get_solution_template_instructions_using_get_with_http_info(self, solution_t header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -465,8 +444,8 @@ def install_solution_template_using_post_with_http_info(self, solution_template_ params[key] = val del params['kwargs'] # verify the required parameter 'solution_template_id' is set - if self.api_client.client_side_validation and ('solution_template_id' not in params or - params['solution_template_id'] is None): # noqa: E501 + if ('solution_template_id' not in params or + params['solution_template_id'] is None): raise ValueError("Missing the required parameter `solution_template_id` when calling `install_solution_template_using_post`") # noqa: E501 collection_formats = {} @@ -487,10 +466,6 @@ def install_solution_template_using_post_with_http_info(self, solution_template_ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -508,4 +483,4 @@ def install_solution_template_using_post_with_http_info(self, solution_template_ _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/subscription_controller_api.py b/tb_rest_client/api/api_pe/subscription_controller_api.py index ef68f911..22cec45a 100644 --- a/tb_rest_client/api/api_pe/subscription_controller_api.py +++ b/tb_rest_client/api/api_pe/subscription_controller_api.py @@ -10,7 +10,6 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - from __future__ import absolute_import import re # noqa: F401 @@ -85,8 +84,8 @@ def get_tenant_profile_data_by_id_using_get_with_http_info(self, tenant_profile_ params[key] = val del params['kwargs'] # verify the required parameter 'tenant_profile_id' is set - if self.api_client.client_side_validation and ('tenant_profile_id' not in params or - params['tenant_profile_id'] is None): # noqa: E501 + if ('tenant_profile_id' not in params or + params['tenant_profile_id'] is None): raise ValueError("Missing the required parameter `tenant_profile_id` when calling `get_tenant_profile_data_by_id_using_get`") # noqa: E501 collection_formats = {} @@ -107,10 +106,6 @@ def get_tenant_profile_data_by_id_using_get_with_http_info(self, tenant_profile_ header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -196,10 +191,6 @@ def get_tenant_profile_data_using_get_with_http_info(self, **kwargs): # noqa: E header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -285,10 +276,6 @@ def get_tenant_subscription_usage_using_get_with_http_info(self, **kwargs): # n header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -306,4 +293,4 @@ def get_tenant_subscription_usage_using_get_with_http_info(self, **kwargs): # n _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/t_mobile_iot_cdp_integration_controller_api.py b/tb_rest_client/api/api_pe/t_mobile_iot_cdp_integration_controller_api.py index cec192b6..2055f760 100644 --- a/tb_rest_client/api/api_pe/t_mobile_iot_cdp_integration_controller_api.py +++ b/tb_rest_client/api/api_pe/t_mobile_iot_cdp_integration_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class TMobileIotCdpIntegrationControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -34,47 +32,47 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def process_request_using_delete2(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_delete4(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_delete2(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_delete4(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_delete2_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_delete4_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_delete2_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_delete4_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_delete2_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_delete4_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_delete2_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_delete4_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -82,21 +80,25 @@ def process_request_using_delete2_with_http_info(self, routing_key, msg, request 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 process_request_using_delete4" % 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 `process_request_using_delete2`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_delete2`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_delete4`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_delete2`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_delete4`") # 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 `process_request_using_delete4`") # noqa: E501 collection_formats = {} @@ -114,8 +116,8 @@ def process_request_using_delete2_with_http_info(self, routing_key, msg, request local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -143,47 +145,47 @@ def process_request_using_delete2_with_http_info(self, routing_key, msg, request _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_get2(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_get4(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_get2(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_get4(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_get2_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_get4_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_get2_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_get4_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_get2_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_get4_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_get2_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_get4_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -191,21 +193,25 @@ def process_request_using_get2_with_http_info(self, routing_key, msg, request_he 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 process_request_using_get4" % 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 `process_request_using_get2`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_get2`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_get4`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_get2`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_get4`") # 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 `process_request_using_get4`") # noqa: E501 collection_formats = {} @@ -223,8 +229,8 @@ def process_request_using_get2_with_http_info(self, routing_key, msg, request_he local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -252,47 +258,47 @@ def process_request_using_get2_with_http_info(self, routing_key, msg, request_he _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_head2(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_head4(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_head2(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_head4(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_head2_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_head4_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_head2_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_head4_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_head2_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_head4_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_head2_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_head4_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -300,21 +306,25 @@ def process_request_using_head2_with_http_info(self, routing_key, msg, request_h 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 process_request_using_head4" % 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 `process_request_using_head2`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_head2`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_head4`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_head2`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_head4`") # 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 `process_request_using_head4`") # noqa: E501 collection_formats = {} @@ -332,8 +342,8 @@ def process_request_using_head2_with_http_info(self, routing_key, msg, request_h local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -361,47 +371,47 @@ def process_request_using_head2_with_http_info(self, routing_key, msg, request_h _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_options2(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_options4(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_options2(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_options4(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_options2_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_options4_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_options2_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_options4_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_options2_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_options4_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_options2_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_options4_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -409,21 +419,25 @@ def process_request_using_options2_with_http_info(self, routing_key, msg, reques 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 process_request_using_options4" % 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 `process_request_using_options2`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_options2`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_options4`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_options2`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_options4`") # 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 `process_request_using_options4`") # noqa: E501 collection_formats = {} @@ -441,8 +455,8 @@ def process_request_using_options2_with_http_info(self, routing_key, msg, reques local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -470,47 +484,47 @@ def process_request_using_options2_with_http_info(self, routing_key, msg, reques _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_patch2(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_patch4(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_patch2(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_patch4(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_patch2_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_patch4_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_patch2_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_patch4_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_patch2_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_patch4_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_patch2_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_patch4_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -518,21 +532,25 @@ def process_request_using_patch2_with_http_info(self, routing_key, msg, request_ 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 process_request_using_patch4" % 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 `process_request_using_patch2`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_patch2`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_patch4`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_patch2`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_patch4`") # 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 `process_request_using_patch4`") # noqa: E501 collection_formats = {} @@ -550,8 +568,8 @@ def process_request_using_patch2_with_http_info(self, routing_key, msg, request_ local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -579,47 +597,47 @@ def process_request_using_patch2_with_http_info(self, routing_key, msg, request_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_post6(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_post12(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_post6(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_post12(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_post6_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_post12_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_post6_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_post12_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_post6_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_post12_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_post6_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_post12_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -627,21 +645,25 @@ def process_request_using_post6_with_http_info(self, routing_key, msg, request_h 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 process_request_using_post12" % 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 `process_request_using_post6`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_post6`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_post12`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post6`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post12`") # 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 `process_request_using_post12`") # noqa: E501 collection_formats = {} @@ -659,8 +681,8 @@ def process_request_using_post6_with_http_info(self, routing_key, msg, request_h local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -688,47 +710,47 @@ def process_request_using_post6_with_http_info(self, routing_key, msg, request_h _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_put2(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_put4(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_put2(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_put4(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_put2_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_put4_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_put2_with_http_info(routing_key, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_put4_with_http_info(body, request_headers, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_put2_with_http_info(self, routing_key, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_put4_with_http_info(self, body, request_headers, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_put2_with_http_info(routing_key, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_put4_with_http_info(body, request_headers, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) :param str routing_key: routingKey (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -736,21 +758,25 @@ def process_request_using_put2_with_http_info(self, routing_key, msg, request_he 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 process_request_using_put4" % 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 `process_request_using_put2`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_put2`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_put4`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_put2`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_put4`") # 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 `process_request_using_put4`") # noqa: E501 collection_formats = {} @@ -768,8 +794,8 @@ def process_request_using_put2_with_http_info(self, routing_key, msg, request_he local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 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 63c6951c..7a5510f4 100644 --- a/tb_rest_client/api/api_pe/tenant_controller_api.py +++ b/tb_rest_client/api/api_pe/tenant_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -21,23 +17,415 @@ # python 2 and python 3 compatibility library import six -from tb_rest_client.api.api_ce import TenantControllerApi +from tb_rest_client.api_client import ApiClient -class TenantControllerApi(TenantControllerApi): +class TenantControllerApi(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): - super().__init__(api_client) + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_tenant_using_delete(self, tenant_id, **kwargs): # noqa: E501 + """deleteTenant # 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_using_delete(tenant_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tenant_id: tenantId (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_tenant_using_delete_with_http_info(tenant_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_tenant_using_delete_with_http_info(tenant_id, **kwargs) # noqa: E501 + return data + + def delete_tenant_using_delete_with_http_info(self, tenant_id, **kwargs): # noqa: E501 + """deleteTenant # 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_using_delete_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tenant_id: tenantId (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['tenant_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_tenant_using_delete" % 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 `delete_tenant_using_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'tenant_id' in params: + path_params['tenantId'] = params['tenant_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/tenant/{tenantId}', '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_tenant_by_id_using_get(self, tenant_id, **kwargs): # noqa: E501 + """getTenantById # noqa: 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_by_id_using_get(tenant_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tenant_id: tenantId (required) + :return: Tenant + 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_by_id_using_get_with_http_info(tenant_id, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_by_id_using_get_with_http_info(tenant_id, **kwargs) # noqa: E501 + return data + + def get_tenant_by_id_using_get_with_http_info(self, tenant_id, **kwargs): # noqa: E501 + """getTenantById # noqa: 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_by_id_using_get_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tenant_id: tenantId (required) + :return: Tenant + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['tenant_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_tenant_by_id_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_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'tenant_id' in params: + path_params['tenantId'] = params['tenant_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenant/{tenantId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Tenant', # 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_info_by_id_using_get(self, tenant_id, **kwargs): # noqa: E501 + """getTenantInfoById # noqa: 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_info_by_id_using_get(tenant_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tenant_id: tenantId (required) + :return: TenantInfo + 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_info_by_id_using_get_with_http_info(tenant_id, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_info_by_id_using_get_with_http_info(tenant_id, **kwargs) # noqa: E501 + return data + + def get_tenant_info_by_id_using_get_with_http_info(self, tenant_id, **kwargs): # noqa: E501 + """getTenantInfoById # noqa: 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_info_by_id_using_get_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str tenant_id: tenantId (required) + :return: TenantInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['tenant_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_tenant_info_by_id_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_info_by_id_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'tenant_id' in params: + path_params['tenantId'] = params['tenant_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenant/info/{tenantId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TenantInfo', # 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_infos_using_get(self, page_size, page, **kwargs): # noqa: E501 + """getTenantInfos # noqa: 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_infos_using_get(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataTenantInfo + 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_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + else: + (data) = self.get_tenant_infos_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 + return data + + def get_tenant_infos_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 + """getTenantInfos # noqa: 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_infos_using_get_with_http_info(page_size, page, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_size: pageSize (required) + :param str page: page (required) + :param str text_search: textSearch + :param str sort_property: sortProperty + :param str sort_order: sortOrder + :return: PageDataTenantInfo + 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_tenant_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_tenant_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_infos_using_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + 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 '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 + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenantInfos{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataTenantInfo', # 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_tenants_by_ids_using_get(self, tenant_ids, **kwargs): # noqa: E501 """getTenantsByIds # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenants_by_ids_using_get(tenant_ids, async_req=True) + >>> thread = api.get_tenants_by_ids_using_get(tenant_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -58,7 +446,7 @@ def get_tenants_by_ids_using_get_with_http_info(self, tenant_ids, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenants_by_ids_using_get_with_http_info(tenant_ids, async_req=True) + >>> thread = api.get_tenants_by_ids_using_get_with_http_info(tenant_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -76,7 +464,11 @@ def get_tenants_by_ids_using_get_with_http_info(self, tenant_ids, **kwargs): # 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_tenants_by_ids_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'tenant_ids' is set @@ -102,10 +494,6 @@ def get_tenants_by_ids_using_get_with_http_info(self, tenant_ids, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -130,7 +518,7 @@ def get_tenants_using_get(self, page_size, page, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenants_using_get(page_size, page, async_req=True) + >>> thread = api.get_tenants_using_get(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -155,7 +543,7 @@ def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenants_using_get_with_http_info(page_size, page, async_req=True) + >>> thread = api.get_tenants_using_get_with_http_info(page_size, page, async_req=True) >>> result = thread.get() :param async_req bool @@ -177,7 +565,11 @@ def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # no 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_tenants_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set @@ -215,6 +607,99 @@ def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # no header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/tenants{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDataTenant', # 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_tenant_using_post(self, body, **kwargs): # noqa: E501 + """saveTenant # 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Tenant body: tenant (required) + :return: Tenant + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_tenant_using_post_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.save_tenant_using_post_with_http_info(body, **kwargs) # noqa: E501 + return data + + def save_tenant_using_post_with_http_info(self, body, **kwargs): # noqa: E501 + """saveTenant # 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Tenant body: tenant (required) + :return: Tenant + 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_tenant_using_post" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_tenant_using_post`") # noqa: E501 + + 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( + ['*/*']) # noqa: E501 + # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 @@ -223,14 +708,14 @@ def get_tenants_using_get_with_http_info(self, page_size, page, **kwargs): # no auth_settings = ['X-Authorization'] # noqa: E501 return self.api_client.call_api( - '/api/tenants{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', + '/api/tenant', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PageDataTenant', # noqa: E501 + response_type='Tenant', # 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/thing_park_integration_controller_api.py b/tb_rest_client/api/api_pe/thing_park_integration_controller_api.py index fc424c9c..fd8572c4 100644 --- a/tb_rest_client/api/api_pe/thing_park_integration_controller_api.py +++ b/tb_rest_client/api/api_pe/thing_park_integration_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class ThingParkIntegrationControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -34,49 +32,49 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def process_request_tpe_using_delete(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_delete(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_delete(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_delete(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_tpe_using_delete_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_tpe_using_delete_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_tpe_using_delete_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_tpe_using_delete_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_tpe_using_delete_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_delete_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_delete_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_delete_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -84,25 +82,29 @@ def process_request_tpe_using_delete_with_http_info(self, routing_key, all_reque 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 process_request_tpe_using_delete" % 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 `process_request_tpe_using_delete`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_delete`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_tpe_using_delete`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_tpe_using_delete`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_tpe_using_delete`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_delete`") # 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 `process_request_tpe_using_delete`") # noqa: E501 collection_formats = {} @@ -122,8 +124,8 @@ def process_request_tpe_using_delete_with_http_info(self, routing_key, all_reque local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -151,49 +153,49 @@ def process_request_tpe_using_delete_with_http_info(self, routing_key, all_reque _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_tpe_using_get(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_get(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_get(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_get(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_tpe_using_get_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_tpe_using_get_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_tpe_using_get_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_tpe_using_get_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_tpe_using_get_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_get_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_get_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_get_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -201,25 +203,29 @@ def process_request_tpe_using_get_with_http_info(self, routing_key, all_request_ 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 process_request_tpe_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 `process_request_tpe_using_get`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_get`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_tpe_using_get`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_tpe_using_get`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_tpe_using_get`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_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 `process_request_tpe_using_get`") # noqa: E501 collection_formats = {} @@ -239,8 +245,8 @@ def process_request_tpe_using_get_with_http_info(self, routing_key, all_request_ local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -268,49 +274,49 @@ def process_request_tpe_using_get_with_http_info(self, routing_key, all_request_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_tpe_using_head(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_head(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_head(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_head(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_tpe_using_head_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_tpe_using_head_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_tpe_using_head_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_tpe_using_head_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_tpe_using_head_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_head_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_head_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_head_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -318,25 +324,29 @@ def process_request_tpe_using_head_with_http_info(self, routing_key, all_request 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 process_request_tpe_using_head" % 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 `process_request_tpe_using_head`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_head`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_tpe_using_head`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_tpe_using_head`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_tpe_using_head`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_head`") # 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 `process_request_tpe_using_head`") # noqa: E501 collection_formats = {} @@ -356,8 +366,8 @@ def process_request_tpe_using_head_with_http_info(self, routing_key, all_request local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -385,49 +395,49 @@ def process_request_tpe_using_head_with_http_info(self, routing_key, all_request _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_tpe_using_options(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_options(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_options(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_options(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_tpe_using_options_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_tpe_using_options_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_tpe_using_options_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_tpe_using_options_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_tpe_using_options_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_options_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_options_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_options_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -435,25 +445,29 @@ def process_request_tpe_using_options_with_http_info(self, routing_key, all_requ 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 process_request_tpe_using_options" % 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 `process_request_tpe_using_options`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_options`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_tpe_using_options`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_tpe_using_options`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_tpe_using_options`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_options`") # 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 `process_request_tpe_using_options`") # noqa: E501 collection_formats = {} @@ -473,8 +487,8 @@ def process_request_tpe_using_options_with_http_info(self, routing_key, all_requ local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -502,49 +516,49 @@ def process_request_tpe_using_options_with_http_info(self, routing_key, all_requ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_tpe_using_patch(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_patch(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_patch(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_patch(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_tpe_using_patch_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_tpe_using_patch_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_tpe_using_patch_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_tpe_using_patch_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_tpe_using_patch_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_patch_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_patch_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_patch_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -552,25 +566,29 @@ def process_request_tpe_using_patch_with_http_info(self, routing_key, all_reques 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 process_request_tpe_using_patch" % 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 `process_request_tpe_using_patch`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_patch`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_tpe_using_patch`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_tpe_using_patch`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_tpe_using_patch`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_patch`") # 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 `process_request_tpe_using_patch`") # noqa: E501 collection_formats = {} @@ -590,8 +608,8 @@ def process_request_tpe_using_patch_with_http_info(self, routing_key, all_reques local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -619,49 +637,49 @@ def process_request_tpe_using_patch_with_http_info(self, routing_key, all_reques _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_tpe_using_post(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_post(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_post(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_post(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_tpe_using_post_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_tpe_using_post_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_tpe_using_post_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_tpe_using_post_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_tpe_using_post_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_post_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_post_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_post_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -669,25 +687,29 @@ def process_request_tpe_using_post_with_http_info(self, routing_key, all_request 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 process_request_tpe_using_post" % 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 `process_request_tpe_using_post`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_post`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_tpe_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_tpe_using_post`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_tpe_using_post`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_post`") # 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 `process_request_tpe_using_post`") # noqa: E501 collection_formats = {} @@ -707,8 +729,8 @@ def process_request_tpe_using_post_with_http_info(self, routing_key, all_request local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -736,49 +758,49 @@ def process_request_tpe_using_post_with_http_info(self, routing_key, all_request _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_tpe_using_put(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_put(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_put(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_put(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_tpe_using_put_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_tpe_using_put_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_tpe_using_put_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_tpe_using_put_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_tpe_using_put_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_tpe_using_put_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequestTPE # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_tpe_using_put_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_tpe_using_put_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -786,25 +808,29 @@ def process_request_tpe_using_put_with_http_info(self, routing_key, all_request_ 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 process_request_tpe_using_put" % 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 `process_request_tpe_using_put`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_put`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_tpe_using_put`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_tpe_using_put`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): raise ValueError("Missing the required parameter `request_headers` when calling `process_request_tpe_using_put`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_tpe_using_put`") # 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 `process_request_tpe_using_put`") # noqa: E501 collection_formats = {} @@ -824,8 +850,8 @@ def process_request_tpe_using_put_with_http_info(self, routing_key, all_request_ local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -853,49 +879,49 @@ def process_request_tpe_using_put_with_http_info(self, routing_key, all_request_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_delete3(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_delete5(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_delete3(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_delete5(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_delete3_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_delete5_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_delete3_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_delete5_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_delete3_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_delete5_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_delete3_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_delete5_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -903,25 +929,29 @@ def process_request_using_delete3_with_http_info(self, routing_key, all_request_ 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 process_request_using_delete5" % 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 `process_request_using_delete3`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_delete3`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_delete3`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_delete5`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_delete3`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_delete5`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_delete5`") # 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 `process_request_using_delete5`") # noqa: E501 collection_formats = {} @@ -941,8 +971,8 @@ def process_request_using_delete3_with_http_info(self, routing_key, all_request_ local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -970,49 +1000,49 @@ def process_request_using_delete3_with_http_info(self, routing_key, all_request_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_get3(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_get5(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_get3(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_get5(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_get3_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_get5_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_get3_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_get5_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_get3_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_get5_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_get3_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_get5_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1020,25 +1050,29 @@ def process_request_using_get3_with_http_info(self, routing_key, all_request_par 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 process_request_using_get5" % 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 `process_request_using_get3`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_get3`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_get3`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_get5`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_get3`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_get5`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_get5`") # 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 `process_request_using_get5`") # noqa: E501 collection_formats = {} @@ -1058,8 +1092,8 @@ def process_request_using_get3_with_http_info(self, routing_key, all_request_par local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -1087,49 +1121,49 @@ def process_request_using_get3_with_http_info(self, routing_key, all_request_par _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_head3(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_head5(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_head3(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_head5(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_head3_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_head5_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_head3_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_head5_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_head3_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_head5_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_head3_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_head5_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1137,25 +1171,29 @@ def process_request_using_head3_with_http_info(self, routing_key, all_request_pa 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 process_request_using_head5" % 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 `process_request_using_head3`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_head3`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_head3`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_head5`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_head3`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_head5`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_head5`") # 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 `process_request_using_head5`") # noqa: E501 collection_formats = {} @@ -1175,8 +1213,8 @@ def process_request_using_head3_with_http_info(self, routing_key, all_request_pa local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -1204,49 +1242,49 @@ def process_request_using_head3_with_http_info(self, routing_key, all_request_pa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_options3(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_options5(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_options3(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_options5(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_options3_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_options5_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_options3_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_options5_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_options3_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_options5_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_options3_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_options5_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1254,25 +1292,29 @@ def process_request_using_options3_with_http_info(self, routing_key, all_request 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 process_request_using_options5" % 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 `process_request_using_options3`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_options3`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_options3`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_options5`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_options3`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_options5`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_options5`") # 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 `process_request_using_options5`") # noqa: E501 collection_formats = {} @@ -1292,8 +1334,8 @@ def process_request_using_options3_with_http_info(self, routing_key, all_request local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -1321,49 +1363,49 @@ def process_request_using_options3_with_http_info(self, routing_key, all_request _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_patch3(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_patch5(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_patch3(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_patch5(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_patch3_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_patch5_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_patch3_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_patch5_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_patch3_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_patch5_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_patch3_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_patch5_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1371,25 +1413,29 @@ def process_request_using_patch3_with_http_info(self, routing_key, all_request_p 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 process_request_using_patch5" % 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 `process_request_using_patch3`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_patch3`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_patch3`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_patch5`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_patch3`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_patch5`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_patch5`") # 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 `process_request_using_patch5`") # noqa: E501 collection_formats = {} @@ -1409,8 +1455,8 @@ def process_request_using_patch3_with_http_info(self, routing_key, all_request_p local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -1438,49 +1484,49 @@ def process_request_using_patch3_with_http_info(self, routing_key, all_request_p _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_post7(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_post13(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_post7(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_post13(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_post7_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_post13_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_post7_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_post13_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_post7_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_post13_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_post7_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_post13_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1488,25 +1534,29 @@ def process_request_using_post7_with_http_info(self, routing_key, all_request_pa 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 process_request_using_post13" % 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 `process_request_using_post7`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_post7`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_post7`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_post13`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post7`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_post13`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_post13`") # 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 `process_request_using_post13`") # noqa: E501 collection_formats = {} @@ -1526,8 +1576,8 @@ def process_request_using_post7_with_http_info(self, routing_key, all_request_pa local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -1555,49 +1605,49 @@ def process_request_using_post7_with_http_info(self, routing_key, all_request_pa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def process_request_using_put3(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_put5(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_put3(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_put5(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (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.process_request_using_put3_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + return self.process_request_using_put5_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 else: - (data) = self.process_request_using_put3_with_http_info(routing_key, all_request_params, msg, request_headers, **kwargs) # noqa: E501 + (data) = self.process_request_using_put5_with_http_info(body, request_headers, all_request_params, routing_key, **kwargs) # noqa: E501 return data - def process_request_using_put3_with_http_info(self, routing_key, all_request_params, msg, request_headers, **kwargs): # noqa: E501 + def process_request_using_put5_with_http_info(self, body, request_headers, all_request_params, routing_key, **kwargs): # noqa: E501 """processRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.process_request_using_put3_with_http_info(routing_key, all_request_params, msg, request_headers, async_req=True) + >>> thread = api.process_request_using_put5_with_http_info(body, request_headers, all_request_params, routing_key, async_req=True) >>> result = thread.get() :param async_req bool + :param str body: msg (required) + :param Object request_headers: requestHeaders (required) + :param Object all_request_params: allRequestParams (required) :param str routing_key: routingKey (required) - :param object all_request_params: allRequestParams (required) - :param str msg: msg (required) - :param object request_headers: requestHeaders (required) :return: DeferredResultResponseEntity If the method is called asynchronously, returns the request thread. """ - all_params = ['routing_key', 'all_request_params', 'msg', 'request_headers'] # noqa: E501 + all_params = ['body', 'request_headers', 'all_request_params', 'routing_key'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1605,25 +1655,29 @@ def process_request_using_put3_with_http_info(self, routing_key, all_request_par 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 process_request_using_put5" % 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 `process_request_using_put3`") # noqa: E501 - # verify the required parameter 'all_request_params' is set - if ('all_request_params' not in params or - params['all_request_params'] is None): - raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_put3`") # noqa: E501 - # verify the required parameter 'msg' is set - if ('msg' not in params or - params['msg'] is None): - raise ValueError("Missing the required parameter `msg` when calling `process_request_using_put3`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `process_request_using_put5`") # noqa: E501 # verify the required parameter 'request_headers' is set if ('request_headers' not in params or params['request_headers'] is None): - raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_put3`") # noqa: E501 + raise ValueError("Missing the required parameter `request_headers` when calling `process_request_using_put5`") # noqa: E501 + # verify the required parameter 'all_request_params' is set + if ('all_request_params' not in params or + params['all_request_params'] is None): + raise ValueError("Missing the required parameter `all_request_params` when calling `process_request_using_put5`") # 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 `process_request_using_put5`") # noqa: E501 collection_formats = {} @@ -1643,8 +1697,8 @@ def process_request_using_put3_with_http_info(self, routing_key, all_request_par local_var_files = {} body_params = None - if 'msg' in params: - body_params = params['msg'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 diff --git a/tb_rest_client/api/api_pe/trail_controller_api.py b/tb_rest_client/api/api_pe/trail_controller_api.py index c1730a60..76150df9 100644 --- a/tb_rest_client/api/api_pe/trail_controller_api.py +++ b/tb_rest_client/api/api_pe/trail_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class TrailControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def delete_device_using_delete1(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_device_using_delete1(async_req=True) + >>> thread = api.delete_device_using_delete1(async_req=True) >>> result = thread.get() :param async_req bool @@ -59,7 +57,7 @@ def delete_device_using_delete1_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_device_using_delete1_with_http_info(async_req=True) + >>> thread = api.delete_device_using_delete1_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -76,7 +74,11 @@ def delete_device_using_delete1_with_http_info(self, **kwargs): # noqa: E501 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_device_using_delete1" % key + ) params[key] = val del params['kwargs'] @@ -92,14 +94,6 @@ def delete_device_using_delete1_with_http_info(self, **kwargs): # noqa: E501 local_var_files = {} body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/user_controller_api.py b/tb_rest_client/api/api_pe/user_controller_api.py index f89335dd..b899d1cb 100644 --- a/tb_rest_client/api/api_pe/user_controller_api.py +++ b/tb_rest_client/api/api_pe/user_controller_api.py @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -21,25 +17,209 @@ # python 2 and python 3 compatibility library import six -from tb_rest_client.api.api_ce import UserControllerApi +from tb_rest_client.api_client import ApiClient -ACTIVATION_TOKEN_REGEX = "/api/noauth/activate?activateToken=" +class UserControllerApi(object): + """NOTE: This class is auto generated by the swagger code generator program. -class UserControllerApi(UserControllerApi): - """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): - super().__init__(api_client) + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_user_using_delete(self, user_id, **kwargs): # noqa: E501 + """deleteUser # 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: userId (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 + else: + (data) = self.delete_user_using_delete_with_http_info(user_id, **kwargs) # noqa: E501 + return data + + def delete_user_using_delete_with_http_info(self, user_id, **kwargs): # noqa: E501 + """deleteUser # 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) + >>> result = thread.get() + + :param async_req bool + :param str user_id: userId (required) + :return: None + 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 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 `delete_user_using_delete`") # 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 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/{userId}', '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_activation_link_using_get(self, user_id, **kwargs): # noqa: E501 + """getActivationLink # noqa: 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) + >>> result = thread.get() + + :param async_req bool + :param str user_id: userId (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_activation_link_using_get_with_http_info(user_id, **kwargs) # noqa: E501 + else: + (data) = self.get_activation_link_using_get_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 + """getActivationLink # noqa: 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) + >>> result = thread.get() + + :param async_req bool + :param str user_id: userId (required) + :return: str + 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_activation_link_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_activation_link_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( + ['text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/{userId}/activationLink', '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 get_all_customer_users_using_get(self, page_size, page, **kwargs): # noqa: E501 """getAllCustomerUsers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_all_customer_users_using_get(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 @@ -64,7 +244,7 @@ def get_all_customer_users_using_get_with_http_info(self, page_size, page, **kwa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_all_customer_users_using_get_with_http_info(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 @@ -86,7 +266,11 @@ def get_all_customer_users_using_get_with_http_info(self, page_size, page, **kwa 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_users_using_get" % key + ) params[key] = val del params['kwargs'] # verify the required parameter 'page_size' is set @@ -124,10 +308,6 @@ def get_all_customer_users_using_get_with_http_info(self, page_size, page, **kwa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -152,7 +332,7 @@ def get_customer_users_using_get(self, customer_id, page_size, page, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_users_using_get(customer_id, page_size, page, 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 @@ -178,7 +358,7 @@ def get_customer_users_using_get_with_http_info(self, customer_id, page_size, pa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_customer_users_using_get_with_http_info(customer_id, page_size, page, 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 @@ -201,7 +381,11 @@ def get_customer_users_using_get_with_http_info(self, customer_id, page_size, pa 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 @@ -245,10 +429,6 @@ def get_customer_users_using_get_with_http_info(self, customer_id, page_size, pa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -273,7 +453,7 @@ def get_tenant_admins_using_get(self, tenant_id, page_size, page, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_admins_using_get(tenant_id, page_size, page, 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 @@ -299,7 +479,7 @@ def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_tenant_admins_using_get_with_http_info(tenant_id, page_size, page, 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 @@ -322,7 +502,11 @@ def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, 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 @@ -366,10 +550,6 @@ def get_tenant_admins_using_get_with_http_info(self, tenant_id, page_size, page, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -389,17 +569,203 @@ 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 + """getUserById # noqa: 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: userId (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 + """getUserById # noqa: 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: userId (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( + ['*/*']) # 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_token_using_get(self, user_id, **kwargs): # noqa: E501 + """getUserToken # noqa: 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: userId (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_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 + """getUserToken # noqa: 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: userId (required) + :return: str + 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( + ['*/*']) # 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='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_user_users_using_get(self, page_size, page, **kwargs): # noqa: E501 """getUserUsers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_users_using_get(page_size, page, 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: pageSize (required) - :param int page: page (required) + :param str page_size: pageSize (required) + :param str page: page (required) :param str text_search: textSearch :param str sort_property: sortProperty :param str sort_order: sortOrder @@ -419,7 +785,7 @@ def get_user_users_using_get_with_http_info(self, page_size, page, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_user_users_using_get_with_http_info(page_size, page, 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 @@ -441,7 +807,11 @@ def get_user_users_using_get_with_http_info(self, page_size, page, **kwargs): # 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 @@ -479,10 +849,6 @@ def get_user_users_using_get_with_http_info(self, page_size, page, **kwargs): # header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -507,7 +873,7 @@ def get_users_by_entity_group_id_using_get(self, entity_group_id, page_size, pag This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_users_by_entity_group_id_using_get(entity_group_id, page_size, page, 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 @@ -533,7 +899,7 @@ def get_users_by_entity_group_id_using_get_with_http_info(self, entity_group_id, This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_users_by_entity_group_id_using_get_with_http_info(entity_group_id, page_size, page, 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 @@ -556,7 +922,11 @@ def get_users_by_entity_group_id_using_get_with_http_info(self, entity_group_id, 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 @@ -572,10 +942,6 @@ def get_users_by_entity_group_id_using_get_with_http_info(self, entity_group_id, params['page'] is None): raise ValueError("Missing the required parameter `page` when calling `get_users_by_entity_group_id_using_get`") # noqa: E501 - if 'page_size' in params and params['page_size'] < 1.0: # noqa: E501 - raise ValueError("Invalid value for parameter `page_size` when calling `get_users_by_entity_group_id_using_get`, must be a value greater than or equal to `1.0`") # noqa: E501 - if 'page' in params and params['page'] < 0.0: # noqa: E501 - raise ValueError("Invalid value for parameter `page` when calling `get_users_by_entity_group_id_using_get`, must be a value greater than or equal to `0.0`") # noqa: E501 collection_formats = {} path_params = {} @@ -604,10 +970,6 @@ def get_users_by_entity_group_id_using_get_with_http_info(self, entity_group_id, header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -632,7 +994,7 @@ def get_users_by_ids_using_get(self, user_ids, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_users_by_ids_using_get(user_ids, async_req=True) + >>> thread = api.get_users_by_ids_using_get(user_ids, async_req=True) >>> result = thread.get() :param async_req bool @@ -653,7 +1015,7 @@ def get_users_by_ids_using_get_with_http_info(self, user_ids, **kwargs): # noqa This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_users_by_ids_using_get_with_http_info(user_ids, 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 @@ -671,7 +1033,11 @@ def get_users_by_ids_using_get_with_http_info(self, user_ids, **kwargs): # noqa 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 @@ -697,10 +1063,6 @@ def get_users_by_ids_using_get_with_http_info(self, user_ids, **kwargs): # noqa header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -720,16 +1082,101 @@ 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 save_user_using_post(self, user, **kwargs): # noqa: E501 + def is_user_token_access_enabled_using_get(self, **kwargs): # noqa: E501 + """isUserTokenAccessEnabled # 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 + + def is_user_token_access_enabled_using_get_with_http_info(self, **kwargs): # noqa: E501 + """isUserTokenAccessEnabled # 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') + 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_user_token_access_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( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/tokenAccessEnabled', '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_user_using_post(self, body, **kwargs): # noqa: E501 """saveUser # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_user_using_post(user, async_req=True) + >>> thread = api.save_user_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param User user: user (required) + :param User body: user (required) :param bool send_activation_mail: sendActivationMail :param str entity_group_id: entityGroupId :return: User @@ -738,21 +1185,21 @@ def save_user_using_post(self, user, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.save_user_using_post_with_http_info(user, **kwargs) # noqa: E501 + return self.save_user_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_user_using_post_with_http_info(user, **kwargs) # noqa: E501 + (data) = self.save_user_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_user_using_post_with_http_info(self, user, **kwargs): # noqa: E501 + def save_user_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveUser # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_user_using_post_with_http_info(user, async_req=True) + >>> thread = api.save_user_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param User user: user (required) + :param User body: user (required) :param bool send_activation_mail: sendActivationMail :param str entity_group_id: entityGroupId :return: User @@ -760,7 +1207,7 @@ def save_user_using_post_with_http_info(self, user, **kwargs): # noqa: E501 returns the request thread. """ - all_params = ['user', 'send_activation_mail', 'entity_group_id'] # noqa: E501 + all_params = ['body', 'send_activation_mail', 'entity_group_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -768,13 +1215,17 @@ def save_user_using_post_with_http_info(self, user, **kwargs): # noqa: E501 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_user_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `save_user_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_user_using_post`") # noqa: E501 collection_formats = {} @@ -792,8 +1243,8 @@ def save_user_using_post_with_http_info(self, user, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'user' in params: - body_params = params['user'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -820,3 +1271,185 @@ def save_user_using_post_with_http_info(self, user, **kwargs): # noqa: E501 _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def send_activation_email_using_post(self, email, **kwargs): # noqa: E501 + """sendActivationEmail # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_activation_email_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.send_activation_email_using_post_with_http_info(email, **kwargs) # noqa: E501 + else: + (data) = self.send_activation_email_using_post_with_http_info(email, **kwargs) # noqa: E501 + return data + + def send_activation_email_using_post_with_http_info(self, email, **kwargs): # noqa: E501 + """sendActivationEmail # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_activation_email_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 send_activation_email_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 `send_activation_email_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 + # Authentication setting + auth_settings = ['X-Authorization'] # noqa: E501 + + return self.api_client.call_api( + '/api/user/sendActivationMail{?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 set_user_credentials_enabled_using_post(self, user_id, **kwargs): # noqa: E501 + """setUserCredentialsEnabled # 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) + >>> result = thread.get() + + :param async_req bool + :param str user_id: userId (required) + :param bool user_credentials_enabled: userCredentialsEnabled + :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_user_credentials_enabled_using_post_with_http_info(user_id, **kwargs) # noqa: E501 + else: + (data) = self.set_user_credentials_enabled_using_post_with_http_info(user_id, **kwargs) # noqa: E501 + return data + + def set_user_credentials_enabled_using_post_with_http_info(self, user_id, **kwargs): # noqa: E501 + """setUserCredentialsEnabled # 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) + >>> result = thread.get() + + :param async_req bool + :param str user_id: userId (required) + :param bool user_credentials_enabled: userCredentialsEnabled + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['user_id', 'user_credentials_enabled'] # 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_user_credentials_enabled_using_post" % 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 `set_user_credentials_enabled_using_post`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'user_id' in params: + path_params['userId'] = params['user_id'] # noqa: E501 + + query_params = [] + if 'user_credentials_enabled' in params: + query_params.append(('userCredentialsEnabled', params['user_credentials_enabled'])) # noqa: E501 + + 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/user/{userId}/userCredentialsEnabled{?userCredentialsEnabled}', '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/user_permissions_controller_api.py b/tb_rest_client/api/api_pe/user_permissions_controller_api.py index d70d1154..6344c529 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class UserPermissionsControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -39,7 +37,7 @@ def get_allowed_permissions_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_allowed_permissions_using_get(async_req=True) + >>> thread = api.get_allowed_permissions_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -59,7 +57,7 @@ def get_allowed_permissions_using_get_with_http_info(self, **kwargs): # noqa: E This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_allowed_permissions_using_get_with_http_info(async_req=True) + >>> thread = api.get_allowed_permissions_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -76,7 +74,11 @@ def get_allowed_permissions_using_get_with_http_info(self, **kwargs): # noqa: E 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_allowed_permissions_using_get" % key + ) params[key] = val del params['kwargs'] @@ -96,10 +98,6 @@ def get_allowed_permissions_using_get_with_http_info(self, **kwargs): # noqa: E header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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/white_labeling_controller_api.py b/tb_rest_client/api/api_pe/white_labeling_controller_api.py index 654fb879..ef3cfd19 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 @@ -1,18 +1,14 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 +""" from __future__ import absolute_import @@ -25,7 +21,9 @@ class WhiteLabelingControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. + """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 """ @@ -34,43 +32,43 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def get_app_theme_css_using_post(self, palette_settings, **kwargs): # noqa: E501 + def get_app_theme_css_using_post(self, body, **kwargs): # noqa: E501 """getAppThemeCss # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_app_theme_css_using_post(palette_settings, async_req=True) + >>> thread = api.get_app_theme_css_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param PaletteSettings palette_settings: paletteSettings (required) + :param PaletteSettings body: paletteSettings (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_app_theme_css_using_post_with_http_info(palette_settings, **kwargs) # noqa: E501 + return self.get_app_theme_css_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.get_app_theme_css_using_post_with_http_info(palette_settings, **kwargs) # noqa: E501 + (data) = self.get_app_theme_css_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def get_app_theme_css_using_post_with_http_info(self, palette_settings, **kwargs): # noqa: E501 + def get_app_theme_css_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """getAppThemeCss # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_app_theme_css_using_post_with_http_info(palette_settings, async_req=True) + >>> thread = api.get_app_theme_css_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param PaletteSettings palette_settings: paletteSettings (required) + :param PaletteSettings body: paletteSettings (required) :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['palette_settings'] # noqa: E501 + all_params = ['body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -78,13 +76,17 @@ def get_app_theme_css_using_post_with_http_info(self, palette_settings, **kwargs 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'] - # verify the required parameter 'palette_settings' is set - if ('palette_settings' not in params or - params['palette_settings'] is None): - raise ValueError("Missing the required parameter `palette_settings` when calling `get_app_theme_css_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `get_app_theme_css_using_post`") # noqa: E501 collection_formats = {} @@ -98,8 +100,8 @@ def get_app_theme_css_using_post_with_http_info(self, palette_settings, **kwargs local_var_files = {} body_params = None - if 'palette_settings' in params: - body_params = params['palette_settings'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['plain/text']) # noqa: E501 @@ -132,7 +134,7 @@ def get_current_login_white_label_params_using_get(self, **kwargs): # noqa: E50 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_current_login_white_label_params_using_get(async_req=True) + >>> thread = api.get_current_login_white_label_params_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -152,7 +154,7 @@ def get_current_login_white_label_params_using_get_with_http_info(self, **kwargs This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_current_login_white_label_params_using_get_with_http_info(async_req=True) + >>> thread = api.get_current_login_white_label_params_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -169,7 +171,11 @@ def get_current_login_white_label_params_using_get_with_http_info(self, **kwargs 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_current_login_white_label_params_using_get" % key + ) params[key] = val del params['kwargs'] @@ -189,10 +195,6 @@ def get_current_login_white_label_params_using_get_with_http_info(self, **kwargs 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 @@ -217,7 +219,7 @@ def get_current_white_label_params_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_current_white_label_params_using_get(async_req=True) + >>> thread = api.get_current_white_label_params_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -237,7 +239,7 @@ def get_current_white_label_params_using_get_with_http_info(self, **kwargs): # This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_current_white_label_params_using_get_with_http_info(async_req=True) + >>> thread = api.get_current_white_label_params_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -254,7 +256,11 @@ def get_current_white_label_params_using_get_with_http_info(self, **kwargs): # 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_current_white_label_params_using_get" % key + ) params[key] = val del params['kwargs'] @@ -274,10 +280,6 @@ def get_current_white_label_params_using_get_with_http_info(self, **kwargs): # 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 @@ -297,16 +299,16 @@ 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, palette_settings, **kwargs): # noqa: E501 + def get_login_theme_css_using_post(self, body, **kwargs): # noqa: E501 """getLoginThemeCss # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_login_theme_css_using_post(palette_settings, async_req=True) + >>> thread = api.get_login_theme_css_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param PaletteSettings palette_settings: paletteSettings (required) + :param PaletteSettings body: paletteSettings (required) :param bool dark_foreground: darkForeground :return: str If the method is called asynchronously, @@ -314,28 +316,28 @@ def get_login_theme_css_using_post(self, palette_settings, **kwargs): # noqa: E """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_login_theme_css_using_post_with_http_info(palette_settings, **kwargs) # noqa: E501 + return self.get_login_theme_css_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.get_login_theme_css_using_post_with_http_info(palette_settings, **kwargs) # noqa: E501 + (data) = self.get_login_theme_css_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def get_login_theme_css_using_post_with_http_info(self, palette_settings, **kwargs): # noqa: E501 + def get_login_theme_css_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """getLoginThemeCss # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_login_theme_css_using_post_with_http_info(palette_settings, async_req=True) + >>> thread = api.get_login_theme_css_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param PaletteSettings palette_settings: paletteSettings (required) + :param PaletteSettings body: paletteSettings (required) :param bool dark_foreground: darkForeground :return: str If the method is called asynchronously, returns the request thread. """ - all_params = ['palette_settings', 'dark_foreground'] # noqa: E501 + all_params = ['body', 'dark_foreground'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -343,13 +345,17 @@ def get_login_theme_css_using_post_with_http_info(self, palette_settings, **kwar 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'] - # verify the required parameter 'palette_settings' is set - if ('palette_settings' not in params or - params['palette_settings'] is None): - raise ValueError("Missing the required parameter `palette_settings` when calling `get_login_theme_css_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `get_login_theme_css_using_post`") # noqa: E501 collection_formats = {} @@ -365,8 +371,8 @@ def get_login_theme_css_using_post_with_http_info(self, palette_settings, **kwar local_var_files = {} body_params = None - if 'palette_settings' in params: - body_params = params['palette_settings'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['plain/text']) # noqa: E501 @@ -399,7 +405,7 @@ def get_login_white_label_params_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_login_white_label_params_using_get(async_req=True) + >>> thread = api.get_login_white_label_params_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -421,7 +427,7 @@ def get_login_white_label_params_using_get_with_http_info(self, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_login_white_label_params_using_get_with_http_info(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 @@ -440,7 +446,11 @@ def get_login_white_label_params_using_get_with_http_info(self, **kwargs): # no 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_white_label_params_using_get" % key + ) params[key] = val del params['kwargs'] @@ -464,10 +474,6 @@ def get_login_white_label_params_using_get_with_http_info(self, **kwargs): # no 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 @@ -492,7 +498,7 @@ def get_white_label_params_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_white_label_params_using_get(async_req=True) + >>> thread = api.get_white_label_params_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -514,7 +520,7 @@ def get_white_label_params_using_get_with_http_info(self, **kwargs): # noqa: E5 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_white_label_params_using_get_with_http_info(async_req=True) + >>> thread = api.get_white_label_params_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -533,7 +539,11 @@ def get_white_label_params_using_get_with_http_info(self, **kwargs): # noqa: E5 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_white_label_params_using_get" % key + ) params[key] = val del params['kwargs'] @@ -557,10 +567,6 @@ def get_white_label_params_using_get_with_http_info(self, **kwargs): # noqa: E5 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 @@ -585,7 +591,7 @@ def is_customer_white_labeling_allowed_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.is_customer_white_labeling_allowed_using_get(async_req=True) + >>> thread = api.is_customer_white_labeling_allowed_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -605,7 +611,7 @@ def is_customer_white_labeling_allowed_using_get_with_http_info(self, **kwargs): This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.is_customer_white_labeling_allowed_using_get_with_http_info(async_req=True) + >>> thread = api.is_customer_white_labeling_allowed_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -622,7 +628,11 @@ def is_customer_white_labeling_allowed_using_get_with_http_info(self, **kwargs): 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_customer_white_labeling_allowed_using_get" % key + ) params[key] = val del params['kwargs'] @@ -642,10 +652,6 @@ def is_customer_white_labeling_allowed_using_get_with_http_info(self, **kwargs): header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -670,7 +676,7 @@ def is_white_labeling_allowed_using_get(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.is_white_labeling_allowed_using_get(async_req=True) + >>> thread = api.is_white_labeling_allowed_using_get(async_req=True) >>> result = thread.get() :param async_req bool @@ -690,7 +696,7 @@ def is_white_labeling_allowed_using_get_with_http_info(self, **kwargs): # noqa: This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.is_white_labeling_allowed_using_get_with_http_info(async_req=True) + >>> thread = api.is_white_labeling_allowed_using_get_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool @@ -707,7 +713,11 @@ def is_white_labeling_allowed_using_get_with_http_info(self, **kwargs): # noqa: 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_white_labeling_allowed_using_get" % key + ) params[key] = val del params['kwargs'] @@ -727,10 +737,6 @@ def is_white_labeling_allowed_using_get_with_http_info(self, **kwargs): # noqa: header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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 @@ -750,43 +756,43 @@ def is_white_labeling_allowed_using_get_with_http_info(self, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def preview_white_label_params_using_post(self, white_labeling_params, **kwargs): # noqa: E501 + def preview_white_label_params_using_post(self, body, **kwargs): # noqa: E501 """previewWhiteLabelParams # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.preview_white_label_params_using_post(white_labeling_params, async_req=True) + >>> thread = api.preview_white_label_params_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param WhiteLabelingParams white_labeling_params: whiteLabelingParams (required) + :param WhiteLabelingParams body: whiteLabelingParams (required) :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.preview_white_label_params_using_post_with_http_info(white_labeling_params, **kwargs) # noqa: E501 + return self.preview_white_label_params_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.preview_white_label_params_using_post_with_http_info(white_labeling_params, **kwargs) # noqa: E501 + (data) = self.preview_white_label_params_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def preview_white_label_params_using_post_with_http_info(self, white_labeling_params, **kwargs): # noqa: E501 + def preview_white_label_params_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """previewWhiteLabelParams # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.preview_white_label_params_using_post_with_http_info(white_labeling_params, async_req=True) + >>> thread = api.preview_white_label_params_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param WhiteLabelingParams white_labeling_params: whiteLabelingParams (required) + :param WhiteLabelingParams body: whiteLabelingParams (required) :return: WhiteLabelingParams If the method is called asynchronously, returns the request thread. """ - all_params = ['white_labeling_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') @@ -794,13 +800,17 @@ def preview_white_label_params_using_post_with_http_info(self, white_labeling_pa 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 preview_white_label_params_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'white_labeling_params' is set - if ('white_labeling_params' not in params or - params['white_labeling_params'] is None): - raise ValueError("Missing the required parameter `white_labeling_params` when calling `preview_white_label_params_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `preview_white_label_params_using_post`") # noqa: E501 collection_formats = {} @@ -814,8 +824,8 @@ def preview_white_label_params_using_post_with_http_info(self, white_labeling_pa local_var_files = {} body_params = None - if 'white_labeling_params' in params: - body_params = params['white_labeling_params'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -843,43 +853,43 @@ def preview_white_label_params_using_post_with_http_info(self, white_labeling_pa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_login_white_label_params_using_post(self, login_white_labeling_params, **kwargs): # noqa: E501 + def save_login_white_label_params_using_post(self, body, **kwargs): # noqa: E501 """saveLoginWhiteLabelParams # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_login_white_label_params_using_post(login_white_labeling_params, async_req=True) + >>> thread = api.save_login_white_label_params_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param LoginWhiteLabelingParams login_white_labeling_params: loginWhiteLabelingParams (required) + :param LoginWhiteLabelingParams body: loginWhiteLabelingParams (required) :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.save_login_white_label_params_using_post_with_http_info(login_white_labeling_params, **kwargs) # noqa: E501 + return self.save_login_white_label_params_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_login_white_label_params_using_post_with_http_info(login_white_labeling_params, **kwargs) # noqa: E501 + (data) = self.save_login_white_label_params_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_login_white_label_params_using_post_with_http_info(self, login_white_labeling_params, **kwargs): # noqa: E501 + def save_login_white_label_params_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveLoginWhiteLabelParams # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_login_white_label_params_using_post_with_http_info(login_white_labeling_params, async_req=True) + >>> thread = api.save_login_white_label_params_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param LoginWhiteLabelingParams login_white_labeling_params: loginWhiteLabelingParams (required) + :param LoginWhiteLabelingParams body: loginWhiteLabelingParams (required) :return: LoginWhiteLabelingParams If the method is called asynchronously, returns the request thread. """ - all_params = ['login_white_labeling_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') @@ -887,13 +897,17 @@ def save_login_white_label_params_using_post_with_http_info(self, login_white_la 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_login_white_label_params_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'login_white_labeling_params' is set - if ('login_white_labeling_params' not in params or - params['login_white_labeling_params'] is None): - raise ValueError("Missing the required parameter `login_white_labeling_params` when calling `save_login_white_label_params_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_login_white_label_params_using_post`") # noqa: E501 collection_formats = {} @@ -907,8 +921,8 @@ def save_login_white_label_params_using_post_with_http_info(self, login_white_la local_var_files = {} body_params = None - if 'login_white_labeling_params' in params: - body_params = params['login_white_labeling_params'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 @@ -936,43 +950,43 @@ def save_login_white_label_params_using_post_with_http_info(self, login_white_la _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def save_white_label_params_using_post(self, white_labeling_params, **kwargs): # noqa: E501 + def save_white_label_params_using_post(self, body, **kwargs): # noqa: E501 """saveWhiteLabelParams # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_white_label_params_using_post(white_labeling_params, async_req=True) + >>> thread = api.save_white_label_params_using_post(body, async_req=True) >>> result = thread.get() :param async_req bool - :param WhiteLabelingParams white_labeling_params: whiteLabelingParams (required) + :param WhiteLabelingParams body: whiteLabelingParams (required) :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.save_white_label_params_using_post_with_http_info(white_labeling_params, **kwargs) # noqa: E501 + return self.save_white_label_params_using_post_with_http_info(body, **kwargs) # noqa: E501 else: - (data) = self.save_white_label_params_using_post_with_http_info(white_labeling_params, **kwargs) # noqa: E501 + (data) = self.save_white_label_params_using_post_with_http_info(body, **kwargs) # noqa: E501 return data - def save_white_label_params_using_post_with_http_info(self, white_labeling_params, **kwargs): # noqa: E501 + def save_white_label_params_using_post_with_http_info(self, body, **kwargs): # noqa: E501 """saveWhiteLabelParams # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.save_white_label_params_using_post_with_http_info(white_labeling_params, async_req=True) + >>> thread = api.save_white_label_params_using_post_with_http_info(body, async_req=True) >>> result = thread.get() :param async_req bool - :param WhiteLabelingParams white_labeling_params: whiteLabelingParams (required) + :param WhiteLabelingParams body: whiteLabelingParams (required) :return: WhiteLabelingParams If the method is called asynchronously, returns the request thread. """ - all_params = ['white_labeling_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') @@ -980,13 +994,17 @@ def save_white_label_params_using_post_with_http_info(self, white_labeling_param 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_white_label_params_using_post" % key + ) params[key] = val del params['kwargs'] - # verify the required parameter 'white_labeling_params' is set - if ('white_labeling_params' not in params or - params['white_labeling_params'] is None): - raise ValueError("Missing the required parameter `white_labeling_params` when calling `save_white_label_params_using_post`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_white_label_params_using_post`") # noqa: E501 collection_formats = {} @@ -1000,8 +1018,8 @@ def save_white_label_params_using_post_with_http_info(self, white_labeling_param local_var_files = {} body_params = None - if 'white_labeling_params' in params: - body_params = params['white_labeling_params'] + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 diff --git a/tb_rest_client/api_client.py b/tb_rest_client/api_client.py index bf190c6d..49831fa3 100644 --- a/tb_rest_client/api_client.py +++ b/tb_rest_client/api_client.py @@ -342,8 +342,8 @@ def __deserialize(self, data, klass): except AttributeError: found_class = getattr(tb_rest_client.models.models_ce, klass) # if all(attr in list(found_class.attribute_map.values()) for attr in list(data.keys())): - if sorted(list(found_class.attribute_map.values())) == sorted(list(data.keys())): - klass = found_class + # if sorted(list(found_class.attribute_map.values())) == sorted(list(data.keys())): + klass = found_class # else: # return self.__deserialize(data, type(data)) return self.__deserialize_data(data, klass) diff --git a/tb_rest_client/configuration.py b/tb_rest_client/configuration.py index ba8c265f..38ae4829 100644 --- a/tb_rest_client/configuration.py +++ b/tb_rest_client/configuration.py @@ -202,7 +202,7 @@ def get_api_key_with_prefix(self, identifier): if self.refresh_api_key_hook: self.refresh_api_key_hook(self) - + key = self.api_key.get(identifier) if key: prefix = self.api_key_prefix.get(identifier) @@ -241,9 +241,9 @@ def to_debug_report(self): :return: The report for debugging. """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 2.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) + return "Python SDK Debug Report:\n" \ + "OS: {env}\n" \ + "Python Version: {pyversion}\n" \ + "Version of the API: 2.0\n" \ + "SDK Package Version: 1.0.0". \ + format(env=sys.platform, pyversion=sys.version) diff --git a/tb_rest_client/models/__init__.py b/tb_rest_client/models/__init__.py index 2af4123f..e69de29b 100644 --- a/tb_rest_client/models/__init__.py +++ b/tb_rest_client/models/__init__.py @@ -1,15 +0,0 @@ -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - diff --git a/tb_rest_client/models/models_ce/__init__.py b/tb_rest_client/models/models_ce/__init__.py index 60428a2b..139b0012 100644 --- a/tb_rest_client/models/models_ce/__init__.py +++ b/tb_rest_client/models/models_ce/__init__.py @@ -1,117 +1,175 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# flake8: noqa -from __future__ import absolute_import - -# import models_ce into model package - -from .admin_settings import AdminSettings +from .page_data_edge import PageDataEdge +from .tenant_info import TenantInfo from .admin_settings_id import AdminSettingsId -from .alarm import Alarm -from .alarm_id import AlarmId -from .alarm_info import AlarmInfo -from .asset import Asset -from .asset_id import AssetId -from .asset_search_query import AssetSearchQuery -from .attributes_entity_view import AttributesEntityView -from .audit_log import AuditLog -from .audit_log_id import AuditLogId -from .blob_entity_id import BlobEntityId -from .claim_request import ClaimRequest -from .component_descriptor import ComponentDescriptor -from .component_descriptor_id import ComponentDescriptorId -from .converter_id import ConverterId -from .customer import Customer -from .customer_id import CustomerId -from .dashboard import Dashboard -from .dashboard_id import DashboardId +from .entity_data import EntityData +from .page_data_device import PageDataDevice +from .server_security_config import ServerSecurityConfig +from .home_dashboard_info import HomeDashboardInfo +from .mapstring_ts_value import MapstringTsValue +from .widget_type import WidgetType +from .event_id import EventId +from .test_sms_request import TestSmsRequest +from .ota_package import OtaPackage +from .user import User +from .o_auth2_mobile_info import OAuth2MobileInfo +from .device_profile_alarm import DeviceProfileAlarm +from .ota_package_info import OtaPackageInfo +from .alarm_data import AlarmData +from .entity_id import EntityId +from .event import Event +from .edge_id import EdgeId +from .device_profile_data import DeviceProfileData +from .page_data_customer import PageDataCustomer +from .sign_up_request import SignUpRequest +from .save_ota_package_info_request import SaveOtaPackageInfoRequest +from .page_data_tb_resource_info import PageDataTbResourceInfo +from .home_dashboard import HomeDashboard +from .page_data_device_profile import PageDataDeviceProfile from .dashboard_info import DashboardInfo -from .deferred_result_response_entity import DeferredResultResponseEntity -from .device import Device -from .device_credentials import DeviceCredentials -from .device_credentials_id import DeviceCredentialsId -from .device_profile import DeviceProfile -from .device_profile_id import DeviceProfileId -from .device_id import DeviceId -from .device_search_query import DeviceSearchQuery +from .byte_buffer import ByteBuffer +from .entity_info import EntityInfo from .edge import Edge -from .edge_id import EdgeId -from .entity_group_id import EntityGroupId -from .entity_id import EntityId -from .entity_relation import EntityRelation -from .entity_relation_info import EntityRelationInfo +from .tenant import Tenant from .entity_relations_query import EntityRelationsQuery -from .entity_subtype import EntitySubtype -from .entity_type_filter import EntityTypeFilter -from .entity_view import EntityView -from .entity_view_id import EntityViewId -from .entity_view_search_query import EntityViewSearchQuery -from .event import Event -from .event_id import EventId -from .group_permission_id import GroupPermissionId -from .integration_id import IntegrationId -from .node_connection_info import NodeConnectionInfo -from .ota_package_info import OtaPackageInfo -from .ota_package import OtaPackage -from .ota_package_id import OtaPackageId -from .file import File -from .tb_resource import TbResource as Resource -from .tb_resource_id import TbResourceId as ResourceId +from .sms_provider_configuration import SmsProviderConfiguration +from .entity_relation_info import EntityRelationInfo +from .tenant_id import TenantId +from .component_descriptor import ComponentDescriptor +from .short_customer_info import ShortCustomerInfo +from .device_profile_info import DeviceProfileInfo +from .o_auth2_registration_info import OAuth2RegistrationInfo +from .device_profile import DeviceProfile +from .lw_m2m_resource_observe import LwM2mResourceObserve +from .page_data_dashboard_info import PageDataDashboardInfo +from .alarm_info import AlarmInfo +from .asset import Asset from .o_auth2_client_info import OAuth2ClientInfo -from .o_auth2_integration_id import OAuth2IntegrationId -from .relations_search_parameters import RelationsSearchParameters -from .response_entity import ResponseEntity -from .role_id import RoleId -from .rule_chain import RuleChain -from .rule_chain_connection_info import RuleChainConnectionInfo +from .page_data_user import PageDataUser from .rule_chain_id import RuleChainId -from .rule_chain_meta_data import RuleChainMetaData +from .admin_settings import AdminSettings +from .o_auth2_client_registration_template import OAuth2ClientRegistrationTemplate from .rule_node import RuleNode -from .rule_node_id import RuleNodeId -from .scheduler_event_id import SchedulerEventId -from .security_settings import SecuritySettings -from .short_customer_info import ShortCustomerInfo -from .telemetry_entity_view import TelemetryEntityView -from .tenant import Tenant -from .tenant_id import TenantId -from .tenant_profile import TenantProfile -from .tenant_profile_id import TenantProfileId +from .device_data import DeviceData +from .dashboard_id import DashboardId from .tenant_profile_data import TenantProfileData -from .tenant_profile_configuration import TenantProfileConfiguration -from .text_page_data_asset import TextPageDataAsset -from .text_page_data_customer import TextPageDataCustomer -from .text_page_data_dashboard_info import TextPageDataDashboardInfo -from .text_page_data_device import TextPageDataDevice -from .text_page_data_entity_view import TextPageDataEntityView -from .text_page_data_rule_chain import TextPageDataRuleChain -from .text_page_data_tenant import TextPageDataTenant -from .text_page_data_user import TextPageDataUser -from .text_page_data_widgets_bundle import TextPageDataWidgetsBundle -from .text_page_link import TextPageLink -from .time_page_data_alarm_info import TimePageDataAlarmInfo -from .time_page_data_audit_log import TimePageDataAuditLog -from .time_page_data_dashboard_info import TimePageDataDashboardInfo -from .time_page_data_event import TimePageDataEvent -from .time_page_link import TimePageLink +from .device import Device +from .o_auth2_custom_mapper_config import OAuth2CustomMapperConfig from .update_message import UpdateMessage -from .user import User +from .ota_package_id import OtaPackageId +from .alarm_schedule import AlarmSchedule from .user_id import UserId -from .user_password_policy import UserPasswordPolicy -from .widget_type import WidgetType +from .widgets_bundle_id import WidgetsBundleId +from .security_settings import SecuritySettings +from .event_filter import EventFilter +from .lw_m2m_object import LwM2mObject +from .edge_search_query import EdgeSearchQuery +from .o_auth2_params_info import OAuth2ParamsInfo +from .entity_view_id import EntityViewId +from .alarm_condition_filter_key import AlarmConditionFilterKey +from .device_transport_configuration import DeviceTransportConfiguration +from .alarm_condition_filter import AlarmConditionFilter +from .alarm import Alarm +from .attributes_entity_view import AttributesEntityView +from .entity_view import EntityView +from .page_data_device_profile_info import PageDataDeviceProfileInfo +from .device_profile_provision_configuration import DeviceProfileProvisionConfiguration +from .o_auth2_info import OAuth2Info +from .resource import Resource +from .page_data_tenant import PageDataTenant +from .widget_type_info import WidgetTypeInfo +from .tb_resource_id import TbResourceId +from .edge_event import EdgeEvent +from .page_data_rule_chain import PageDataRuleChain +from .customer_id import CustomerId +from .alarm_rule import AlarmRule +from .key_filter import KeyFilter +from .input_stream import InputStream +from .ota_package_ota_package_idchecksumchecksum_algorithm_body import OtaPackageOtaPackageIdchecksumchecksumAlgorithmBody +from .object_node import ObjectNode +from .device_configuration import DeviceConfiguration +from .entity_subtype import EntitySubtype +from .entity_key import EntityKey +from .response_entity import ResponseEntity +from .page_data_event import PageDataEvent +from .deferred_result_response_entity import DeferredResultResponseEntity +from .url import URL +from .dashboard import Dashboard +from .rule_chain_meta_data import RuleChainMetaData +from .edge_event_id import EdgeEventId +from .claim_request import ClaimRequest from .widget_type_id import WidgetTypeId +from .relations_search_parameters import RelationsSearchParameters +from .o_auth2_basic_mapper_config import OAuth2BasicMapperConfig +from .page_data_widgets_bundle import PageDataWidgetsBundle +from .rpc import Rpc +from .file import File from .widgets_bundle import WidgetsBundle -from .widgets_bundle_id import WidgetsBundleId +from .rpc_id import RpcId +from .page_data_entity_info import PageDataEntityInfo +from .page_data_alarm_data import PageDataAlarmData +from .default_rule_chain_create_request import DefaultRuleChainCreateRequest +from .ts_value import TsValue +from .device_profile_configuration import DeviceProfileConfiguration +from .page_data_asset import PageDataAsset +from .entity_data_query import EntityDataQuery +from .entity_count_query import EntityCountQuery +from .uri import URI +from .url_stream_handler import URLStreamHandler +from .entity_view_search_query import EntityViewSearchQuery +from .o_auth2_domain_info import OAuth2DomainInfo +from .node_connection_info import NodeConnectionInfo +from .entity_data_page_link import EntityDataPageLink +from .device_credentials import DeviceCredentials +from .telemetry_entity_view import TelemetryEntityView +from .asset_search_query import AssetSearchQuery +from .entity_filter import EntityFilter +from .page_data_alarm_info import PageDataAlarmInfo +from .page_data_entity_data import PageDataEntityData +from .page_data_tenant_info import PageDataTenantInfo +from .page_data_audit_log import PageDataAuditLog +from .tenant_profile_configuration import TenantProfileConfiguration +from .customer import Customer +from .device_profile_transport_configuration import DeviceProfileTransportConfiguration +from .tb_resource_info import TbResourceInfo +from .widget_type_details import WidgetTypeDetails +from .relation_entity_type_filter import RelationEntityTypeFilter +from .tenant_profile_id import TenantProfileId +from .tenant_profile import TenantProfile +from .key_filter_predicate import KeyFilterPredicate +from .o_auth2_mapper_config import OAuth2MapperConfig +from .alarm_condition import AlarmCondition +from .rule_chain_data import RuleChainData +from .lw_m2m_instance import LwM2mInstance +from .page_data_tenant_profile import PageDataTenantProfile +from .page_data_entity_view import PageDataEntityView +from .user_password_policy import UserPasswordPolicy +from .page_data_edge_event import PageDataEdgeEvent +from .device_id import DeviceId +from .component_descriptor_id import ComponentDescriptorId +from .entity_relation import EntityRelation +from .o_auth2_client_registration_template_id import OAuth2ClientRegistrationTemplateId +from .alarm_id import AlarmId +from .audit_log import AuditLog +from .alarm_data_page_link import AlarmDataPageLink +from .device_search_query import DeviceSearchQuery +from .alarm_data_query import AlarmDataQuery +from .alarm_condition_spec import AlarmConditionSpec +from .asset_id import AssetId +from .tb_resource import TbResource +from .device_credentials_id import DeviceCredentialsId +from .rule_node_id import RuleNodeId +from .rule_chain_connection_info import RuleChainConnectionInfo +from .audit_log_id import AuditLogId +from .device_profile_id import DeviceProfileId +from .entity_data_sort_order import EntityDataSortOrder +from .page_data_ota_package_info import PageDataOtaPackageInfo +from .rule_chain import RuleChain +from .page_data_asset_info import PageDataAssetInfo +from .device_info import DeviceInfo +from .edge_info import EdgeInfo +from .page_data_entity_view_info import PageDataEntityViewInfo +from .page_data_edge_info import PageDataEdgeInfo +from .page_data_rpc import PageDataRpc +from .asset_info import AssetInfo +from .page_data_device_info import PageDataDeviceInfo +from .entity_view_info import EntityViewInfo diff --git a/tb_rest_client/models/models_ce/admin_settings.py b/tb_rest_client/models/models_ce/admin_settings.py index b2f619ff..0758688d 100644 --- a/tb_rest_client/models/models_ce/admin_settings.py +++ b/tb_rest_client/models/models_ce/admin_settings.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 AdminSettings(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 @@ -47,13 +43,11 @@ class AdminSettings(object): def __init__(self, created_time=None, id=None, json_value=None, key=None): # noqa: E501 """AdminSettings - a model defined in Swagger""" # noqa: E501 - self._created_time = None self._id = None self._json_value = None self._key = None self.discriminator = None - if created_time is not None: self.created_time = created_time if id is not None: 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 64549819..f3cd3eba 100644 --- a/tb_rest_client/models/models_ce/admin_settings_id.py +++ b/tb_rest_client/models/models_ce/admin_settings_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 AdminSettingsId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -41,10 +37,8 @@ class AdminSettingsId(object): def __init__(self, id=None): # noqa: E501 """AdminSettingsId - a model defined in Swagger""" # noqa: E501 - self._id = None self.discriminator = None - if id is not None: self.id = id diff --git a/tb_rest_client/models/models_ce/alarm.py b/tb_rest_client/models/models_ce/alarm.py index d033f761..5eae8d15 100644 --- a/tb_rest_client/models/models_ce/alarm.py +++ b/tb_rest_client/models/models_ce/alarm.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Alarm(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -35,6 +31,7 @@ class Alarm(object): 'ack_ts': 'int', 'clear_ts': 'int', 'created_time': 'int', + 'customer_id': 'CustomerId', 'details': 'str', 'end_ts': 'int', 'id': 'AlarmId', @@ -53,6 +50,7 @@ class Alarm(object): 'ack_ts': 'ackTs', 'clear_ts': 'clearTs', 'created_time': 'createdTime', + 'customer_id': 'customerId', 'details': 'details', 'end_ts': 'endTs', 'id': 'id', @@ -67,12 +65,12 @@ class Alarm(object): 'type': 'type' } - def __init__(self, ack_ts=None, clear_ts=None, created_time=None, details=None, end_ts=None, id=None, name=None, originator=None, propagate=None, propagate_relation_types=None, severity=None, start_ts=None, status=None, tenant_id=None, type=None): # noqa: E501 + def __init__(self, ack_ts=None, clear_ts=None, created_time=None, customer_id=None, details=None, end_ts=None, id=None, name=None, originator=None, propagate=None, propagate_relation_types=None, severity=None, start_ts=None, status=None, tenant_id=None, type=None): # noqa: E501 """Alarm - a model defined in Swagger""" # noqa: E501 - self._ack_ts = None self._clear_ts = None self._created_time = None + self._customer_id = None self._details = None self._end_ts = None self._id = None @@ -86,13 +84,14 @@ def __init__(self, ack_ts=None, clear_ts=None, created_time=None, details=None, self._tenant_id = None self._type = None self.discriminator = None - if ack_ts is not None: self.ack_ts = ack_ts if clear_ts is not None: self.clear_ts = clear_ts if created_time is not None: self.created_time = created_time + if customer_id is not None: + self.customer_id = customer_id if details is not None: self.details = details if end_ts is not None: @@ -181,6 +180,27 @@ def created_time(self, created_time): self._created_time = created_time + @property + def customer_id(self): + """Gets the customer_id of this Alarm. # noqa: E501 + + + :return: The customer_id of this Alarm. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this Alarm. + + + :param customer_id: The customer_id of this Alarm. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + @property def details(self): """Gets the details of this Alarm. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/alarm_condition.py b/tb_rest_client/models/models_ce/alarm_condition.py new file mode 100644 index 00000000..702e569e --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_condition.py @@ -0,0 +1,136 @@ +# 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 AlarmCondition(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 = { + 'condition': 'list[AlarmConditionFilter]', + 'spec': 'AlarmConditionSpec' + } + + attribute_map = { + 'condition': 'condition', + 'spec': 'spec' + } + + def __init__(self, condition=None, spec=None): # noqa: E501 + """AlarmCondition - a model defined in Swagger""" # noqa: E501 + self._condition = None + self._spec = None + self.discriminator = None + if condition is not None: + self.condition = condition + if spec is not None: + self.spec = spec + + @property + def condition(self): + """Gets the condition of this AlarmCondition. # noqa: E501 + + + :return: The condition of this AlarmCondition. # noqa: E501 + :rtype: list[AlarmConditionFilter] + """ + return self._condition + + @condition.setter + def condition(self, condition): + """Sets the condition of this AlarmCondition. + + + :param condition: The condition of this AlarmCondition. # noqa: E501 + :type: list[AlarmConditionFilter] + """ + + self._condition = condition + + @property + def spec(self): + """Gets the spec of this AlarmCondition. # noqa: E501 + + + :return: The spec of this AlarmCondition. # noqa: E501 + :rtype: AlarmConditionSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this AlarmCondition. + + + :param spec: The spec of this AlarmCondition. # noqa: E501 + :type: AlarmConditionSpec + """ + + self._spec = spec + + 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(AlarmCondition, 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, AlarmCondition): + 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_filter.py b/tb_rest_client/models/models_ce/alarm_condition_filter.py new file mode 100644 index 00000000..eb55e176 --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_condition_filter.py @@ -0,0 +1,194 @@ +# 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 AlarmConditionFilter(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 = { + 'key': 'AlarmConditionFilterKey', + 'predicate': 'KeyFilterPredicate', + 'value': 'object', + 'value_type': 'str' + } + + attribute_map = { + 'key': 'key', + 'predicate': 'predicate', + 'value': 'value', + 'value_type': 'valueType' + } + + def __init__(self, key=None, predicate=None, value=None, value_type=None): # noqa: E501 + """AlarmConditionFilter - a model defined in Swagger""" # noqa: E501 + self._key = None + self._predicate = None + self._value = None + self._value_type = None + self.discriminator = None + if key is not None: + self.key = key + if predicate is not None: + self.predicate = predicate + if value is not None: + self.value = value + if value_type is not None: + self.value_type = value_type + + @property + def key(self): + """Gets the key of this AlarmConditionFilter. # noqa: E501 + + + :return: The key of this AlarmConditionFilter. # noqa: E501 + :rtype: AlarmConditionFilterKey + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this AlarmConditionFilter. + + + :param key: The key of this AlarmConditionFilter. # noqa: E501 + :type: AlarmConditionFilterKey + """ + + self._key = key + + @property + def predicate(self): + """Gets the predicate of this AlarmConditionFilter. # noqa: E501 + + + :return: The predicate of this AlarmConditionFilter. # noqa: E501 + :rtype: KeyFilterPredicate + """ + return self._predicate + + @predicate.setter + def predicate(self, predicate): + """Sets the predicate of this AlarmConditionFilter. + + + :param predicate: The predicate of this AlarmConditionFilter. # noqa: E501 + :type: KeyFilterPredicate + """ + + self._predicate = predicate + + @property + def value(self): + """Gets the value of this AlarmConditionFilter. # noqa: E501 + + + :return: The value of this AlarmConditionFilter. # noqa: E501 + :rtype: object + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this AlarmConditionFilter. + + + :param value: The value of this AlarmConditionFilter. # noqa: E501 + :type: object + """ + + self._value = value + + @property + def value_type(self): + """Gets the value_type of this AlarmConditionFilter. # noqa: E501 + + + :return: The value_type of this AlarmConditionFilter. # noqa: E501 + :rtype: str + """ + return self._value_type + + @value_type.setter + def value_type(self, value_type): + """Sets the value_type of this AlarmConditionFilter. + + + :param value_type: The value_type of this AlarmConditionFilter. # noqa: E501 + :type: str + """ + allowed_values = ["STRING", "NUMERIC", "BOOLEAN", "DATE_TIME"] # noqa: E501 + if value_type not in allowed_values: + raise ValueError( + "Invalid value for `value_type` ({0}), must be one of {1}" # noqa: E501 + .format(value_type, allowed_values) + ) + + self._value_type = value_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(AlarmConditionFilter, 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, AlarmConditionFilter): + 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_filter_key.py b/tb_rest_client/models/models_ce/alarm_condition_filter_key.py new file mode 100644 index 00000000..9c833b79 --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_condition_filter_key.py @@ -0,0 +1,142 @@ +# 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 AlarmConditionFilterKey(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 = { + 'key': 'str', + 'type': 'str' + } + + attribute_map = { + 'key': 'key', + 'type': 'type' + } + + def __init__(self, key=None, type=None): # noqa: E501 + """AlarmConditionFilterKey - a model defined in Swagger""" # noqa: E501 + self._key = None + self._type = None + self.discriminator = None + if key is not None: + self.key = key + if type is not None: + self.type = type + + @property + def key(self): + """Gets the key of this AlarmConditionFilterKey. # noqa: E501 + + + :return: The key of this AlarmConditionFilterKey. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this AlarmConditionFilterKey. + + + :param key: The key of this AlarmConditionFilterKey. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def type(self): + """Gets the type of this AlarmConditionFilterKey. # noqa: E501 + + + :return: The type of this AlarmConditionFilterKey. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AlarmConditionFilterKey. + + + :param type: The type of this AlarmConditionFilterKey. # noqa: E501 + :type: str + """ + allowed_values = ["ATTRIBUTE", "TIME_SERIES", "ENTITY_FIELD", "CONSTANT"] # 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(AlarmConditionFilterKey, 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, AlarmConditionFilterKey): + 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_spec.py b/tb_rest_client/models/models_ce/alarm_condition_spec.py new file mode 100644 index 00000000..174e58d2 --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_condition_spec.py @@ -0,0 +1,84 @@ +# 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 AlarmConditionSpec(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 + """AlarmConditionSpec - 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(AlarmConditionSpec, 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, AlarmConditionSpec): + 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 new file mode 100644 index 00000000..25a43d53 --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_data.py @@ -0,0 +1,590 @@ +# 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 AlarmData(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 = { + 'ack_ts': 'int', + 'clear_ts': 'int', + 'created_time': 'int', + 'customer_id': 'CustomerId', + 'details': 'str', + 'end_ts': 'int', + 'entity_id': 'EntityId', + 'id': 'AlarmId', + 'latest': 'dict(str, dict(str, TsValue))', + 'name': 'str', + 'originator': 'EntityId', + 'originator_name': 'str', + 'propagate': 'bool', + 'propagate_relation_types': 'list[str]', + 'severity': 'str', + 'start_ts': 'int', + 'status': 'str', + 'tenant_id': 'TenantId', + 'type': 'str' + } + + attribute_map = { + 'ack_ts': 'ackTs', + 'clear_ts': 'clearTs', + 'created_time': 'createdTime', + 'customer_id': 'customerId', + 'details': 'details', + 'end_ts': 'endTs', + 'entity_id': 'entityId', + 'id': 'id', + 'latest': 'latest', + 'name': 'name', + 'originator': 'originator', + 'originator_name': 'originatorName', + 'propagate': 'propagate', + 'propagate_relation_types': 'propagateRelationTypes', + 'severity': 'severity', + 'start_ts': 'startTs', + 'status': 'status', + 'tenant_id': 'tenantId', + 'type': 'type' + } + + def __init__(self, ack_ts=None, clear_ts=None, created_time=None, customer_id=None, details=None, end_ts=None, entity_id=None, id=None, latest=None, name=None, originator=None, originator_name=None, propagate=None, propagate_relation_types=None, severity=None, start_ts=None, status=None, tenant_id=None, type=None): # noqa: E501 + """AlarmData - a model defined in Swagger""" # noqa: E501 + self._ack_ts = None + self._clear_ts = None + self._created_time = None + self._customer_id = None + self._details = None + self._end_ts = None + self._entity_id = None + self._id = None + self._latest = None + self._name = None + self._originator = None + self._originator_name = None + self._propagate = None + self._propagate_relation_types = None + self._severity = None + self._start_ts = None + self._status = None + self._tenant_id = None + self._type = None + self.discriminator = None + if ack_ts is not None: + self.ack_ts = ack_ts + if clear_ts is not None: + self.clear_ts = clear_ts + if created_time is not None: + self.created_time = created_time + if customer_id is not None: + self.customer_id = customer_id + if details is not None: + self.details = details + if end_ts is not None: + self.end_ts = end_ts + if entity_id is not None: + self.entity_id = entity_id + if id is not None: + self.id = id + if latest is not None: + self.latest = latest + if name is not None: + self.name = name + if originator is not None: + self.originator = originator + if originator_name is not None: + self.originator_name = originator_name + if propagate is not None: + self.propagate = propagate + if propagate_relation_types is not None: + self.propagate_relation_types = propagate_relation_types + if severity is not None: + self.severity = severity + if start_ts is not None: + self.start_ts = start_ts + if status is not None: + self.status = status + if tenant_id is not None: + self.tenant_id = tenant_id + if type is not None: + self.type = type + + @property + def ack_ts(self): + """Gets the ack_ts of this AlarmData. # noqa: E501 + + + :return: The ack_ts of this AlarmData. # noqa: E501 + :rtype: int + """ + return self._ack_ts + + @ack_ts.setter + def ack_ts(self, ack_ts): + """Sets the ack_ts of this AlarmData. + + + :param ack_ts: The ack_ts of this AlarmData. # noqa: E501 + :type: int + """ + + self._ack_ts = ack_ts + + @property + def clear_ts(self): + """Gets the clear_ts of this AlarmData. # noqa: E501 + + + :return: The clear_ts of this AlarmData. # noqa: E501 + :rtype: int + """ + return self._clear_ts + + @clear_ts.setter + def clear_ts(self, clear_ts): + """Sets the clear_ts of this AlarmData. + + + :param clear_ts: The clear_ts of this AlarmData. # noqa: E501 + :type: int + """ + + self._clear_ts = clear_ts + + @property + def created_time(self): + """Gets the created_time of this AlarmData. # noqa: E501 + + + :return: The created_time of this AlarmData. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this AlarmData. + + + :param created_time: The created_time of this AlarmData. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def customer_id(self): + """Gets the customer_id of this AlarmData. # noqa: E501 + + + :return: The customer_id of this AlarmData. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this AlarmData. + + + :param customer_id: The customer_id of this AlarmData. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + + @property + def details(self): + """Gets the details of this AlarmData. # noqa: E501 + + + :return: The details of this AlarmData. # noqa: E501 + :rtype: str + """ + return self._details + + @details.setter + def details(self, details): + """Sets the details of this AlarmData. + + + :param details: The details of this AlarmData. # noqa: E501 + :type: str + """ + + self._details = details + + @property + def end_ts(self): + """Gets the end_ts of this AlarmData. # noqa: E501 + + + :return: The end_ts of this AlarmData. # noqa: E501 + :rtype: int + """ + return self._end_ts + + @end_ts.setter + def end_ts(self, end_ts): + """Sets the end_ts of this AlarmData. + + + :param end_ts: The end_ts of this AlarmData. # noqa: E501 + :type: int + """ + + self._end_ts = end_ts + + @property + def entity_id(self): + """Gets the entity_id of this AlarmData. # noqa: E501 + + + :return: The entity_id of this AlarmData. # noqa: E501 + :rtype: EntityId + """ + return self._entity_id + + @entity_id.setter + def entity_id(self, entity_id): + """Sets the entity_id of this AlarmData. + + + :param entity_id: The entity_id of this AlarmData. # noqa: E501 + :type: EntityId + """ + + self._entity_id = entity_id + + @property + def id(self): + """Gets the id of this AlarmData. # noqa: E501 + + + :return: The id of this AlarmData. # noqa: E501 + :rtype: AlarmId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AlarmData. + + + :param id: The id of this AlarmData. # noqa: E501 + :type: AlarmId + """ + + self._id = id + + @property + def latest(self): + """Gets the latest of this AlarmData. # noqa: E501 + + + :return: The latest of this AlarmData. # noqa: E501 + :rtype: dict(str, dict(str, TsValue)) + """ + return self._latest + + @latest.setter + def latest(self, latest): + """Sets the latest of this AlarmData. + + + :param latest: The latest of this AlarmData. # noqa: E501 + :type: dict(str, dict(str, TsValue)) + """ + + self._latest = latest + + @property + def name(self): + """Gets the name of this AlarmData. # noqa: E501 + + + :return: The name of this AlarmData. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AlarmData. + + + :param name: The name of this AlarmData. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def originator(self): + """Gets the originator of this AlarmData. # noqa: E501 + + + :return: The originator of this AlarmData. # noqa: E501 + :rtype: EntityId + """ + return self._originator + + @originator.setter + def originator(self, originator): + """Sets the originator of this AlarmData. + + + :param originator: The originator of this AlarmData. # noqa: E501 + :type: EntityId + """ + + self._originator = originator + + @property + def originator_name(self): + """Gets the originator_name of this AlarmData. # 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. + + + :param originator_name: The originator_name of this AlarmData. # noqa: E501 + :type: str + """ + + self._originator_name = originator_name + + @property + def propagate(self): + """Gets the propagate of this AlarmData. # 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. + + + :param propagate: The propagate of this AlarmData. # noqa: E501 + :type: bool + """ + + self._propagate = propagate + + @property + def propagate_relation_types(self): + """Gets the propagate_relation_types of this AlarmData. # noqa: E501 + + + :return: The propagate_relation_types of this AlarmData. # noqa: E501 + :rtype: list[str] + """ + return self._propagate_relation_types + + @propagate_relation_types.setter + def propagate_relation_types(self, propagate_relation_types): + """Sets the propagate_relation_types of this AlarmData. + + + :param propagate_relation_types: The propagate_relation_types of this AlarmData. # noqa: E501 + :type: list[str] + """ + + self._propagate_relation_types = propagate_relation_types + + @property + def severity(self): + """Gets the severity of this AlarmData. # noqa: E501 + + + :return: The severity of this AlarmData. # noqa: E501 + :rtype: str + """ + return self._severity + + @severity.setter + def severity(self, severity): + """Sets the severity of this AlarmData. + + + :param severity: The severity of this AlarmData. # noqa: E501 + :type: str + """ + allowed_values = ["CRITICAL", "MAJOR", "MINOR", "WARNING", "INDETERMINATE"] # noqa: E501 + if severity not in allowed_values: + raise ValueError( + "Invalid value for `severity` ({0}), must be one of {1}" # noqa: E501 + .format(severity, allowed_values) + ) + + self._severity = severity + + @property + def start_ts(self): + """Gets the start_ts of this AlarmData. # noqa: E501 + + + :return: The start_ts of this AlarmData. # noqa: E501 + :rtype: int + """ + return self._start_ts + + @start_ts.setter + def start_ts(self, start_ts): + """Sets the start_ts of this AlarmData. + + + :param start_ts: The start_ts of this AlarmData. # noqa: E501 + :type: int + """ + + self._start_ts = start_ts + + @property + def status(self): + """Gets the status of this AlarmData. # 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. + + + :param status: The status of this AlarmData. # noqa: E501 + :type: str + """ + allowed_values = ["ACTIVE_UNACK", "ACTIVE_ACK", "CLEARED_UNACK", "CLEARED_ACK"] # 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 tenant_id(self): + """Gets the tenant_id of this AlarmData. # noqa: E501 + + + :return: The tenant_id of this AlarmData. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this AlarmData. + + + :param tenant_id: The tenant_id of this AlarmData. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def type(self): + """Gets the type of this AlarmData. # noqa: E501 + + + :return: The type of this AlarmData. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AlarmData. + + + :param type: The type of this AlarmData. # noqa: E501 + :type: str + """ + + 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(AlarmData, 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, AlarmData): + 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_page_link.py b/tb_rest_client/models/models_ce/alarm_data_page_link.py new file mode 100644 index 00000000..3280a0eb --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_data_page_link.py @@ -0,0 +1,417 @@ +# 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 AlarmDataPageLink(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 = { + 'dynamic': 'bool', + 'page': 'int', + 'page_size': 'int', + 'sort_order': 'EntityDataSortOrder', + 'start_ts': 'int', + 'text_search': 'str', + 'end_ts': 'int', + 'time_window': 'int', + 'type_list': 'list[str]', + 'status_list': 'list[str]', + 'severity_list': 'list[str]', + 'search_propagated_alarms': 'bool' + } + + attribute_map = { + 'dynamic': 'dynamic', + 'page': 'page', + 'page_size': 'pageSize', + 'sort_order': 'sortOrder', + 'start_ts': 'startTs', + 'text_search': 'textSearch', + 'end_ts': 'endTs', + 'time_window': 'timeWindow', + 'type_list': 'typeList', + 'status_list': 'statusList', + 'severity_list': 'severityList', + 'search_propagated_alarms': 'searchPropagatedAlarms' + } + + def __init__(self, dynamic=None, page=None, page_size=None, sort_order=None, start_ts=None, text_search=None, end_ts=None, time_window=None, type_list=None, status_list=None, severity_list=None, search_propagated_alarms=None): # noqa: E501 + """AlarmDataPageLink - a model defined in Swagger""" # noqa: E501 + self._dynamic = None + self._page = None + self._page_size = None + self._sort_order = None + self._start_ts = None + self._text_search = None + self._end_ts = None + self._time_window = None + self._type_list = None + self._status_list = None + self._severity_list = None + self._search_propagated_alarms = None + self.discriminator = None + if dynamic is not None: + self.dynamic = dynamic + if page is not None: + self.page = page + if page_size is not None: + self.page_size = page_size + if sort_order is not None: + self.sort_order = sort_order + self.start_ts = start_ts + if text_search is not None: + self.text_search = text_search + self.end_ts = end_ts + self.time_window = time_window + self.type_list = type_list + self.status_list = status_list + self.severity_list = severity_list + self.search_propagated_alarms = search_propagated_alarms + + @property + def dynamic(self): + """Gets the dynamic of this AlarmDataPageLink. # noqa: E501 + + + :return: The dynamic of this AlarmDataPageLink. # noqa: E501 + :rtype: bool + """ + return self._dynamic + + @dynamic.setter + def dynamic(self, dynamic): + """Sets the dynamic of this AlarmDataPageLink. + + + :param dynamic: The dynamic of this AlarmDataPageLink. # noqa: E501 + :type: bool + """ + + self._dynamic = dynamic + + @property + def page(self): + """Gets the page of this AlarmDataPageLink. # noqa: E501 + + + :return: The page of this AlarmDataPageLink. # noqa: E501 + :rtype: int + """ + return self._page + + @page.setter + def page(self, page): + """Sets the page of this AlarmDataPageLink. + + + :param page: The page of this AlarmDataPageLink. # noqa: E501 + :type: int + """ + + self._page = page + + @property + def page_size(self): + """Gets the page_size of this AlarmDataPageLink. # noqa: E501 + + + :return: The page_size of this AlarmDataPageLink. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this AlarmDataPageLink. + + + :param page_size: The page_size of this AlarmDataPageLink. # noqa: E501 + :type: int + """ + + self._page_size = page_size + + @property + def sort_order(self): + """Gets the sort_order of this AlarmDataPageLink. # noqa: E501 + + + :return: The sort_order of this AlarmDataPageLink. # noqa: E501 + :rtype: EntityDataSortOrder + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order): + """Sets the sort_order of this AlarmDataPageLink. + + + :param sort_order: The sort_order of this AlarmDataPageLink. # noqa: E501 + :type: EntityDataSortOrder + """ + + self._sort_order = sort_order + + @property + def start_ts(self): + """Gets the start_ts of this AlarmDataPageLink. # noqa: E501 + + + :return: The start_ts of this AlarmDataPageLink. # noqa: E501 + :rtype: int + """ + return self._start_ts + + @start_ts.setter + def start_ts(self, start_ts): + """Sets the start_ts of this AlarmDataPageLink. + + + :param start_ts: The start_ts of this AlarmDataPageLink. # noqa: E501 + :type: int + """ + if start_ts is None: + raise ValueError("Invalid value for `start_ts`, must not be `None`") # noqa: E501 + + self._start_ts = start_ts + + @property + def text_search(self): + """Gets the text_search of this AlarmDataPageLink. # noqa: E501 + + + :return: The text_search of this AlarmDataPageLink. # noqa: E501 + :rtype: str + """ + return self._text_search + + @text_search.setter + def text_search(self, text_search): + """Sets the text_search of this AlarmDataPageLink. + + + :param text_search: The text_search of this AlarmDataPageLink. # noqa: E501 + :type: str + """ + + self._text_search = text_search + + @property + def end_ts(self): + """Gets the end_ts of this AlarmDataPageLink. # noqa: E501 + + + :return: The end_ts of this AlarmDataPageLink. # noqa: E501 + :rtype: int + """ + return self._end_ts + + @end_ts.setter + def end_ts(self, end_ts): + """Sets the end_ts of this AlarmDataPageLink. + + + :param end_ts: The end_ts of this AlarmDataPageLink. # noqa: E501 + :type: int + """ + if end_ts is None: + raise ValueError("Invalid value for `end_ts`, must not be `None`") # noqa: E501 + + self._end_ts = end_ts + + @property + def time_window(self): + """Gets the time_window of this AlarmDataPageLink. # noqa: E501 + + + :return: The time_window of this AlarmDataPageLink. # noqa: E501 + :rtype: int + """ + return self._time_window + + @time_window.setter + def time_window(self, time_window): + """Sets the time_window of this AlarmDataPageLink. + + + :param time_window: The time_window of this AlarmDataPageLink. # noqa: E501 + :type: int + """ + if time_window is None: + raise ValueError("Invalid value for `time_window`, must not be `None`") # noqa: E501 + + self._time_window = time_window + + @property + def type_list(self): + """Gets the type_list of this AlarmDataPageLink. # noqa: E501 + + + :return: The type_list of this AlarmDataPageLink. # noqa: E501 + :rtype: list[str] + """ + return self._type_list + + @type_list.setter + def type_list(self, type_list): + """Sets the type_list of this AlarmDataPageLink. + + + :param type_list: The type_list of this AlarmDataPageLink. # noqa: E501 + :type: list[str] + """ + if type_list is None: + raise ValueError("Invalid value for `type_list`, must not be `None`") # noqa: E501 + + self._type_list = type_list + + @property + def status_list(self): + """Gets the status_list of this AlarmDataPageLink. # noqa: E501 + + + :return: The status_list of this AlarmDataPageLink. # noqa: E501 + :rtype: list[str] + """ + return self._status_list + + @status_list.setter + def status_list(self, status_list): + """Sets the status_list of this AlarmDataPageLink. + + + :param status_list: The status_list of this AlarmDataPageLink. # noqa: E501 + :type: list[str] + """ + if status_list is None: + raise ValueError("Invalid value for `status_list`, must not be `None`") # noqa: E501 + allowed_values = ["ANY", "ACTIVE", "CLEARED", "ACK", "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 severity_list(self): + """Gets the severity_list of this AlarmDataPageLink. # noqa: E501 + + + :return: The severity_list of this AlarmDataPageLink. # noqa: E501 + :rtype: list[str] + """ + return self._severity_list + + @severity_list.setter + def severity_list(self, severity_list): + """Sets the severity_list of this AlarmDataPageLink. + + + :param severity_list: The severity_list of this AlarmDataPageLink. # noqa: E501 + :type: list[str] + """ + if severity_list is None: + raise ValueError("Invalid value for `severity_list`, must not be `None`") # noqa: E501 + allowed_values = ["CRITICAL", "MAJOR", "MINOR", "WARNING", "INDETERMINATE"] # 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 search_propagated_alarms(self): + """Gets the search_propagated_alarms of this AlarmDataPageLink. # noqa: E501 + + + :return: The search_propagated_alarms of this AlarmDataPageLink. # 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 AlarmDataPageLink. + + + :param search_propagated_alarms: The search_propagated_alarms of this AlarmDataPageLink. # noqa: E501 + :type: bool + """ + if search_propagated_alarms is None: + raise ValueError("Invalid value for `search_propagated_alarms`, must not be `None`") # noqa: E501 + + self._search_propagated_alarms = search_propagated_alarms + + 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(AlarmDataPageLink, 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, AlarmDataPageLink): + 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_query.py b/tb_rest_client/models/models_ce/alarm_data_query.py new file mode 100644 index 00000000..65fd4d92 --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_data_query.py @@ -0,0 +1,240 @@ +# 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 AlarmDataQuery(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_fields': 'list[EntityKey]', + 'entity_fields': 'list[EntityKey]', + 'entity_filter': 'EntityFilter', + 'key_filters': 'list[KeyFilter]', + 'latest_values': 'list[EntityKey]', + 'page_link': 'AlarmDataPageLink' + } + + attribute_map = { + 'alarm_fields': 'alarmFields', + 'entity_fields': 'entityFields', + 'entity_filter': 'entityFilter', + 'key_filters': 'keyFilters', + 'latest_values': 'latestValues', + 'page_link': 'pageLink' + } + + def __init__(self, alarm_fields=None, entity_fields=None, entity_filter=None, key_filters=None, latest_values=None, page_link=None): # noqa: E501 + """AlarmDataQuery - a model defined in Swagger""" # noqa: E501 + self._alarm_fields = None + self._entity_fields = None + self._entity_filter = None + self._key_filters = None + self._latest_values = None + self._page_link = None + self.discriminator = None + if alarm_fields is not None: + self.alarm_fields = alarm_fields + if entity_fields is not None: + self.entity_fields = entity_fields + if entity_filter is not None: + self.entity_filter = entity_filter + if key_filters is not None: + self.key_filters = key_filters + if latest_values is not None: + self.latest_values = latest_values + if page_link is not None: + self.page_link = page_link + + @property + def alarm_fields(self): + """Gets the alarm_fields of this AlarmDataQuery. # noqa: E501 + + + :return: The alarm_fields of this AlarmDataQuery. # noqa: E501 + :rtype: list[EntityKey] + """ + return self._alarm_fields + + @alarm_fields.setter + def alarm_fields(self, alarm_fields): + """Sets the alarm_fields of this AlarmDataQuery. + + + :param alarm_fields: The alarm_fields of this AlarmDataQuery. # noqa: E501 + :type: list[EntityKey] + """ + + self._alarm_fields = alarm_fields + + @property + def entity_fields(self): + """Gets the entity_fields of this AlarmDataQuery. # noqa: E501 + + + :return: The entity_fields of this AlarmDataQuery. # noqa: E501 + :rtype: list[EntityKey] + """ + return self._entity_fields + + @entity_fields.setter + def entity_fields(self, entity_fields): + """Sets the entity_fields of this AlarmDataQuery. + + + :param entity_fields: The entity_fields of this AlarmDataQuery. # noqa: E501 + :type: list[EntityKey] + """ + + self._entity_fields = entity_fields + + @property + def entity_filter(self): + """Gets the entity_filter of this AlarmDataQuery. # noqa: E501 + + + :return: The entity_filter of this AlarmDataQuery. # noqa: E501 + :rtype: EntityFilter + """ + return self._entity_filter + + @entity_filter.setter + def entity_filter(self, entity_filter): + """Sets the entity_filter of this AlarmDataQuery. + + + :param entity_filter: The entity_filter of this AlarmDataQuery. # noqa: E501 + :type: EntityFilter + """ + + self._entity_filter = entity_filter + + @property + def key_filters(self): + """Gets the key_filters of this AlarmDataQuery. # noqa: E501 + + + :return: The key_filters of this AlarmDataQuery. # noqa: E501 + :rtype: list[KeyFilter] + """ + return self._key_filters + + @key_filters.setter + def key_filters(self, key_filters): + """Sets the key_filters of this AlarmDataQuery. + + + :param key_filters: The key_filters of this AlarmDataQuery. # noqa: E501 + :type: list[KeyFilter] + """ + + self._key_filters = key_filters + + @property + def latest_values(self): + """Gets the latest_values of this AlarmDataQuery. # noqa: E501 + + + :return: The latest_values of this AlarmDataQuery. # noqa: E501 + :rtype: list[EntityKey] + """ + return self._latest_values + + @latest_values.setter + def latest_values(self, latest_values): + """Sets the latest_values of this AlarmDataQuery. + + + :param latest_values: The latest_values of this AlarmDataQuery. # noqa: E501 + :type: list[EntityKey] + """ + + self._latest_values = latest_values + + @property + def page_link(self): + """Gets the page_link of this AlarmDataQuery. # noqa: E501 + + + :return: The page_link of this AlarmDataQuery. # noqa: E501 + :rtype: AlarmDataPageLink + """ + return self._page_link + + @page_link.setter + def page_link(self, page_link): + """Sets the page_link of this AlarmDataQuery. + + + :param page_link: The page_link of this AlarmDataQuery. # noqa: E501 + :type: AlarmDataPageLink + """ + + self._page_link = page_link + + 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(AlarmDataQuery, 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, AlarmDataQuery): + 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_id.py b/tb_rest_client/models/models_ce/alarm_id.py index e2a70c93..17c31c57 100644 --- a/tb_rest_client/models/models_ce/alarm_id.py +++ b/tb_rest_client/models/models_ce/alarm_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 AlarmId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -32,70 +28,36 @@ class AlarmId(object): and the value is json key in definition. """ swagger_types = { - 'entity_type': 'str', 'id': 'str' } attribute_map = { - 'entity_type': 'entityType', 'id': 'id' } - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None + def __init__(self, id=None): # noqa: E501 + """AlarmId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type if id is not None: self.id = id - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 + """Gets the id of this AlarmId. # noqa: E501 - :return: The id of this EntityId. # noqa: E501 + :return: The id of this AlarmId. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this EntityId. + """Sets the id of this AlarmId. - :param id: The id of this EntityId. # noqa: E501 + :param id: The id of this AlarmId. # noqa: E501 :type: str """ @@ -122,7 +84,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(self.__class__, dict): + if issubclass(AlarmId, dict): for key, value in self.items(): result[key] = value @@ -138,7 +100,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): + if not isinstance(other, AlarmId): return False return self.__dict__ == other.__dict__ diff --git a/tb_rest_client/models/models_ce/alarm_info.py b/tb_rest_client/models/models_ce/alarm_info.py index 1bf2f673..f5fd6f12 100644 --- a/tb_rest_client/models/models_ce/alarm_info.py +++ b/tb_rest_client/models/models_ce/alarm_info.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 AlarmInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -35,6 +31,7 @@ class AlarmInfo(object): 'ack_ts': 'int', 'clear_ts': 'int', 'created_time': 'int', + 'customer_id': 'CustomerId', 'details': 'str', 'end_ts': 'int', 'id': 'AlarmId', @@ -54,6 +51,7 @@ class AlarmInfo(object): 'ack_ts': 'ackTs', 'clear_ts': 'clearTs', 'created_time': 'createdTime', + 'customer_id': 'customerId', 'details': 'details', 'end_ts': 'endTs', 'id': 'id', @@ -69,12 +67,12 @@ class AlarmInfo(object): 'type': 'type' } - def __init__(self, ack_ts=None, clear_ts=None, created_time=None, details=None, end_ts=None, id=None, name=None, originator=None, originator_name=None, propagate=None, propagate_relation_types=None, severity=None, start_ts=None, status=None, tenant_id=None, type=None): # noqa: E501 + def __init__(self, ack_ts=None, clear_ts=None, created_time=None, customer_id=None, details=None, end_ts=None, id=None, name=None, originator=None, originator_name=None, propagate=None, propagate_relation_types=None, severity=None, start_ts=None, status=None, tenant_id=None, type=None): # noqa: E501 """AlarmInfo - a model defined in Swagger""" # noqa: E501 - self._ack_ts = None self._clear_ts = None self._created_time = None + self._customer_id = None self._details = None self._end_ts = None self._id = None @@ -89,13 +87,14 @@ def __init__(self, ack_ts=None, clear_ts=None, created_time=None, details=None, self._tenant_id = None self._type = None self.discriminator = None - if ack_ts is not None: self.ack_ts = ack_ts if clear_ts is not None: self.clear_ts = clear_ts if created_time is not None: self.created_time = created_time + if customer_id is not None: + self.customer_id = customer_id if details is not None: self.details = details if end_ts is not None: @@ -186,6 +185,27 @@ def created_time(self, created_time): self._created_time = created_time + @property + def customer_id(self): + """Gets the customer_id of this AlarmInfo. # noqa: E501 + + + :return: The customer_id of this AlarmInfo. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this AlarmInfo. + + + :param customer_id: The customer_id of this AlarmInfo. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + @property def details(self): """Gets the details of this AlarmInfo. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/alarm_rule.py b/tb_rest_client/models/models_ce/alarm_rule.py new file mode 100644 index 00000000..c25f449f --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_rule.py @@ -0,0 +1,188 @@ +# 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 AlarmRule(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_details': 'str', + 'condition': 'AlarmCondition', + 'dashboard_id': 'DashboardId', + 'schedule': 'AlarmSchedule' + } + + attribute_map = { + 'alarm_details': 'alarmDetails', + 'condition': 'condition', + 'dashboard_id': 'dashboardId', + 'schedule': 'schedule' + } + + def __init__(self, alarm_details=None, condition=None, dashboard_id=None, schedule=None): # noqa: E501 + """AlarmRule - a model defined in Swagger""" # noqa: E501 + self._alarm_details = None + self._condition = None + self._dashboard_id = None + self._schedule = None + self.discriminator = None + if alarm_details is not None: + self.alarm_details = alarm_details + if condition is not None: + self.condition = condition + if dashboard_id is not None: + self.dashboard_id = dashboard_id + if schedule is not None: + self.schedule = schedule + + @property + def alarm_details(self): + """Gets the alarm_details of this AlarmRule. # noqa: E501 + + + :return: The alarm_details of this AlarmRule. # noqa: E501 + :rtype: str + """ + return self._alarm_details + + @alarm_details.setter + def alarm_details(self, alarm_details): + """Sets the alarm_details of this AlarmRule. + + + :param alarm_details: The alarm_details of this AlarmRule. # noqa: E501 + :type: str + """ + + self._alarm_details = alarm_details + + @property + def condition(self): + """Gets the condition of this AlarmRule. # noqa: E501 + + + :return: The condition of this AlarmRule. # noqa: E501 + :rtype: AlarmCondition + """ + return self._condition + + @condition.setter + def condition(self, condition): + """Sets the condition of this AlarmRule. + + + :param condition: The condition of this AlarmRule. # noqa: E501 + :type: AlarmCondition + """ + + self._condition = condition + + @property + def dashboard_id(self): + """Gets the dashboard_id of this AlarmRule. # noqa: E501 + + + :return: The dashboard_id of this AlarmRule. # noqa: E501 + :rtype: DashboardId + """ + return self._dashboard_id + + @dashboard_id.setter + def dashboard_id(self, dashboard_id): + """Sets the dashboard_id of this AlarmRule. + + + :param dashboard_id: The dashboard_id of this AlarmRule. # noqa: E501 + :type: DashboardId + """ + + self._dashboard_id = dashboard_id + + @property + def schedule(self): + """Gets the schedule of this AlarmRule. # noqa: E501 + + + :return: The schedule of this AlarmRule. # noqa: E501 + :rtype: AlarmSchedule + """ + return self._schedule + + @schedule.setter + def schedule(self, schedule): + """Sets the schedule of this AlarmRule. + + + :param schedule: The schedule of this AlarmRule. # noqa: E501 + :type: AlarmSchedule + """ + + self._schedule = schedule + + 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(AlarmRule, 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, AlarmRule): + 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_schedule.py b/tb_rest_client/models/models_ce/alarm_schedule.py new file mode 100644 index 00000000..d039ca62 --- /dev/null +++ b/tb_rest_client/models/models_ce/alarm_schedule.py @@ -0,0 +1,116 @@ +# 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 AlarmSchedule(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 = { + 'type': 'str' + } + + attribute_map = { + 'type': 'type' + } + + def __init__(self, type=None): # noqa: E501 + """AlarmSchedule - a model defined in Swagger""" # noqa: E501 + self._type = None + self.discriminator = None + if type is not None: + self.type = type + + @property + def type(self): + """Gets the type of this AlarmSchedule. # noqa: E501 + + + :return: The type of this AlarmSchedule. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this AlarmSchedule. + + + :param type: The type of this AlarmSchedule. # noqa: E501 + :type: str + """ + allowed_values = ["ANY_TIME", "SPECIFIC_TIME", "CUSTOM"] # 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(AlarmSchedule, 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, AlarmSchedule): + 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.py b/tb_rest_client/models/models_ce/asset.py index 475b227e..19782421 100644 --- a/tb_rest_client/models/models_ce/asset.py +++ b/tb_rest_client/models/models_ce/asset.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Asset(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -55,7 +51,6 @@ class Asset(object): def __init__(self, additional_info=None, created_time=None, customer_id=None, id=None, label=None, name=None, tenant_id=None, type=None): # noqa: E501 """Asset - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._created_time = None self._customer_id = None @@ -65,7 +60,6 @@ def __init__(self, additional_info=None, created_time=None, customer_id=None, id self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if created_time is not None: diff --git a/tb_rest_client/models/models_ce/asset_id.py b/tb_rest_client/models/models_ce/asset_id.py index c601159b..f6aae1aa 100644 --- a/tb_rest_client/models/models_ce/asset_id.py +++ b/tb_rest_client/models/models_ce/asset_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 AssetId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -32,70 +28,36 @@ class AssetId(object): and the value is json key in definition. """ swagger_types = { - 'entity_type': 'str', 'id': 'str' } attribute_map = { - 'entity_type': 'entityType', 'id': 'id' } - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None + def __init__(self, id=None): # noqa: E501 + """AssetId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type if id is not None: self.id = id - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 + """Gets the id of this AssetId. # noqa: E501 - :return: The id of this EntityId. # noqa: E501 + :return: The id of this AssetId. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this EntityId. + """Sets the id of this AssetId. - :param id: The id of this EntityId. # noqa: E501 + :param id: The id of this AssetId. # noqa: E501 :type: str """ @@ -122,7 +84,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(self.__class__, dict): + if issubclass(AssetId, dict): for key, value in self.items(): result[key] = value @@ -138,7 +100,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): + if not isinstance(other, AssetId): return False return self.__dict__ == other.__dict__ diff --git a/tb_rest_client/models/models_ce/asset_info.py b/tb_rest_client/models/models_ce/asset_info.py new file mode 100644 index 00000000..5c50f90b --- /dev/null +++ b/tb_rest_client/models/models_ce/asset_info.py @@ -0,0 +1,344 @@ +# 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 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 = { + 'additional_info': 'str', + 'created_time': 'int', + 'customer_id': 'CustomerId', + 'customer_is_public': 'bool', + 'customer_title': 'str', + 'id': 'AssetId', + 'label': 'str', + 'name': 'str', + 'tenant_id': 'TenantId', + 'type': 'str' + } + + attribute_map = { + 'additional_info': 'additionalInfo', + 'created_time': 'createdTime', + 'customer_id': 'customerId', + 'customer_is_public': 'customerIsPublic', + 'customer_title': 'customerTitle', + 'id': 'id', + 'label': 'label', + 'name': 'name', + 'tenant_id': 'tenantId', + 'type': 'type' + } + + def __init__(self, additional_info=None, created_time=None, customer_id=None, customer_is_public=None, customer_title=None, id=None, label=None, name=None, tenant_id=None, type=None): # noqa: E501 + """AssetInfo - a model defined in Swagger""" # noqa: E501 + self._additional_info = None + self._created_time = None + self._customer_id = None + self._customer_is_public = None + self._customer_title = None + self._id = None + self._label = None + self._name = None + self._tenant_id = None + self._type = None + self.discriminator = None + if additional_info is not None: + self.additional_info = additional_info + if created_time is not None: + self.created_time = created_time + if customer_id is not None: + self.customer_id = customer_id + if customer_is_public is not None: + self.customer_is_public = customer_is_public + if customer_title is not None: + self.customer_title = customer_title + if id is not None: + self.id = id + if label is not None: + self.label = label + if name is not None: + self.name = name + if tenant_id is not None: + self.tenant_id = tenant_id + if type is not None: + self.type = type + + @property + def additional_info(self): + """Gets the additional_info of this AssetInfo. # noqa: E501 + + + :return: The additional_info of this AssetInfo. # noqa: E501 + :rtype: str + """ + 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: str + """ + + self._additional_info = additional_info + + @property + def created_time(self): + """Gets the created_time of this AssetInfo. # 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. + + + :param created_time: The created_time of this AssetInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @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 customer_is_public(self): + """Gets the customer_is_public of this AssetInfo. # noqa: E501 + + + :return: The customer_is_public of this AssetInfo. # noqa: E501 + :rtype: bool + """ + return self._customer_is_public + + @customer_is_public.setter + def customer_is_public(self, customer_is_public): + """Sets the customer_is_public of this AssetInfo. + + + :param customer_is_public: The customer_is_public of this AssetInfo. # noqa: E501 + :type: bool + """ + + self._customer_is_public = customer_is_public + + @property + def customer_title(self): + """Gets the customer_title of this AssetInfo. # noqa: E501 + + + :return: The customer_title of this AssetInfo. # noqa: E501 + :rtype: str + """ + return self._customer_title + + @customer_title.setter + def customer_title(self, customer_title): + """Sets the customer_title of this AssetInfo. + + + :param customer_title: The customer_title of this AssetInfo. # noqa: E501 + :type: str + """ + + self._customer_title = customer_title + + @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 label(self): + """Gets the label of this AssetInfo. # 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. + + + :param label: The label of this AssetInfo. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def name(self): + """Gets the name of this AssetInfo. # 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. + + + :param name: The name of this AssetInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @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 type(self): + """Gets the type of this AssetInfo. # 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. + + + :param type: The type of this AssetInfo. # noqa: E501 + :type: str + """ + + 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(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_ce/asset_search_query.py b/tb_rest_client/models/models_ce/asset_search_query.py index c7e548d9..6b5ade65 100644 --- a/tb_rest_client/models/models_ce/asset_search_query.py +++ b/tb_rest_client/models/models_ce/asset_search_query.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 AssetSearchQuery(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 @@ -45,12 +41,10 @@ class AssetSearchQuery(object): def __init__(self, asset_types=None, parameters=None, relation_type=None): # noqa: E501 """AssetSearchQuery - a model defined in Swagger""" # noqa: E501 - self._asset_types = None self._parameters = None self._relation_type = None self.discriminator = None - if asset_types is not None: self.asset_types = asset_types if parameters is not None: 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 4eeb4cf4..caaeef92 100644 --- a/tb_rest_client/models/models_ce/attributes_entity_view.py +++ b/tb_rest_client/models/models_ce/attributes_entity_view.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 AttributesEntityView(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -45,12 +41,10 @@ class AttributesEntityView(object): def __init__(self, cs=None, sh=None, ss=None): # noqa: E501 """AttributesEntityView - a model defined in Swagger""" # noqa: E501 - self._cs = None self._sh = None self._ss = None self.discriminator = None - if cs is not None: self.cs = cs if sh is not None: diff --git a/tb_rest_client/models/models_ce/audit_log.py b/tb_rest_client/models/models_ce/audit_log.py index 83eb4554..ed405d96 100644 --- a/tb_rest_client/models/models_ce/audit_log.py +++ b/tb_rest_client/models/models_ce/audit_log.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 AuditLog(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -63,7 +59,6 @@ class AuditLog(object): def __init__(self, action_data=None, action_failure_details=None, action_status=None, action_type=None, created_time=None, customer_id=None, entity_id=None, entity_name=None, id=None, tenant_id=None, user_id=None, user_name=None): # noqa: E501 """AuditLog - a model defined in Swagger""" # noqa: E501 - self._action_data = None self._action_failure_details = None self._action_status = None @@ -77,7 +72,6 @@ def __init__(self, action_data=None, action_failure_details=None, action_status= self._user_id = None self._user_name = None self.discriminator = None - if action_data is not None: self.action_data = action_data if action_failure_details is not None: @@ -190,7 +184,7 @@ def action_type(self, action_type): :param action_type: The action_type of this AuditLog. # noqa: E501 :type: str """ - allowed_values = ["ADDED", "DELETED", "UPDATED", "ATTRIBUTES_UPDATED", "ATTRIBUTES_DELETED", "TIMESERIES_DELETED", "RPC_CALL", "CREDENTIALS_UPDATED", "ASSIGNED_TO_CUSTOMER", "UNASSIGNED_FROM_CUSTOMER", "ACTIVATED", "SUSPENDED", "CREDENTIALS_READ", "ATTRIBUTES_READ", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "RELATIONS_DELETED", "ALARM_ACK", "ALARM_CLEAR", "LOGIN", "LOGOUT", "LOCKOUT"] # noqa: E501 + allowed_values = ["ADDED", "DELETED", "UPDATED", "ATTRIBUTES_UPDATED", "ATTRIBUTES_DELETED", "TIMESERIES_UPDATED", "TIMESERIES_DELETED", "RPC_CALL", "CREDENTIALS_UPDATED", "ASSIGNED_TO_CUSTOMER", "UNASSIGNED_FROM_CUSTOMER", "ACTIVATED", "SUSPENDED", "CREDENTIALS_READ", "ATTRIBUTES_READ", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "RELATIONS_DELETED", "ALARM_ACK", "ALARM_CLEAR", "ALARM_DELETE", "LOGIN", "LOGOUT", "LOCKOUT", "ASSIGNED_FROM_TENANT", "ASSIGNED_TO_TENANT", "PROVISION_SUCCESS", "PROVISION_FAILURE", "ASSIGNED_TO_EDGE", "UNASSIGNED_FROM_EDGE"] # 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 2bb1d078..262f0b26 100644 --- a/tb_rest_client/models/models_ce/audit_log_id.py +++ b/tb_rest_client/models/models_ce/audit_log_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 AuditLogId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -41,10 +37,8 @@ class AuditLogId(object): def __init__(self, id=None): # noqa: E501 """AuditLogId - a model defined in Swagger""" # noqa: E501 - self._id = None self.discriminator = None - if id is not None: self.id = id diff --git a/tb_rest_client/models/models_ce/byte_buffer.py b/tb_rest_client/models/models_ce/byte_buffer.py new file mode 100644 index 00000000..6a2c961f --- /dev/null +++ b/tb_rest_client/models/models_ce/byte_buffer.py @@ -0,0 +1,292 @@ +# 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 ByteBuffer(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 = { + 'char': 'str', + 'direct': 'bool', + 'double': 'float', + '_float': 'float', + '_int': 'int', + 'long': 'int', + 'read_only': 'bool', + 'short': 'int' + } + + attribute_map = { + 'char': 'char', + 'direct': 'direct', + 'double': 'double', + '_float': 'float', + '_int': 'int', + 'long': 'long', + 'read_only': 'readOnly', + 'short': 'short' + } + + def __init__(self, char=None, direct=None, double=None, _float=None, _int=None, long=None, read_only=None, short=None): # noqa: E501 + """ByteBuffer - a model defined in Swagger""" # noqa: E501 + self._char = None + self._direct = None + self._double = None + self.__float = None + self.__int = None + self._long = None + self._read_only = None + self._short = None + self.discriminator = None + if char is not None: + self.char = char + if direct is not None: + self.direct = direct + if double is not None: + self.double = double + if _float is not None: + self._float = _float + if _int is not None: + self._int = _int + if long is not None: + self.long = long + if read_only is not None: + self.read_only = read_only + if short is not None: + self.short = short + + @property + def char(self): + """Gets the char of this ByteBuffer. # noqa: E501 + + + :return: The char of this ByteBuffer. # noqa: E501 + :rtype: str + """ + return self._char + + @char.setter + def char(self, char): + """Sets the char of this ByteBuffer. + + + :param char: The char of this ByteBuffer. # noqa: E501 + :type: str + """ + + self._char = char + + @property + def direct(self): + """Gets the direct of this ByteBuffer. # noqa: E501 + + + :return: The direct of this ByteBuffer. # noqa: E501 + :rtype: bool + """ + return self._direct + + @direct.setter + def direct(self, direct): + """Sets the direct of this ByteBuffer. + + + :param direct: The direct of this ByteBuffer. # noqa: E501 + :type: bool + """ + + self._direct = direct + + @property + def double(self): + """Gets the double of this ByteBuffer. # noqa: E501 + + + :return: The double of this ByteBuffer. # noqa: E501 + :rtype: float + """ + return self._double + + @double.setter + def double(self, double): + """Sets the double of this ByteBuffer. + + + :param double: The double of this ByteBuffer. # noqa: E501 + :type: float + """ + + self._double = double + + @property + def _float(self): + """Gets the _float of this ByteBuffer. # noqa: E501 + + + :return: The _float of this ByteBuffer. # noqa: E501 + :rtype: float + """ + return self.__float + + @_float.setter + def _float(self, _float): + """Sets the _float of this ByteBuffer. + + + :param _float: The _float of this ByteBuffer. # noqa: E501 + :type: float + """ + + self.__float = _float + + @property + def _int(self): + """Gets the _int of this ByteBuffer. # noqa: E501 + + + :return: The _int of this ByteBuffer. # noqa: E501 + :rtype: int + """ + return self.__int + + @_int.setter + def _int(self, _int): + """Sets the _int of this ByteBuffer. + + + :param _int: The _int of this ByteBuffer. # noqa: E501 + :type: int + """ + + self.__int = _int + + @property + def long(self): + """Gets the long of this ByteBuffer. # noqa: E501 + + + :return: The long of this ByteBuffer. # noqa: E501 + :rtype: int + """ + return self._long + + @long.setter + def long(self, long): + """Sets the long of this ByteBuffer. + + + :param long: The long of this ByteBuffer. # noqa: E501 + :type: int + """ + + self._long = long + + @property + def read_only(self): + """Gets the read_only of this ByteBuffer. # noqa: E501 + + + :return: The read_only of this ByteBuffer. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this ByteBuffer. + + + :param read_only: The read_only of this ByteBuffer. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + @property + def short(self): + """Gets the short of this ByteBuffer. # noqa: E501 + + + :return: The short of this ByteBuffer. # noqa: E501 + :rtype: int + """ + return self._short + + @short.setter + def short(self, short): + """Sets the short of this ByteBuffer. + + + :param short: The short of this ByteBuffer. # noqa: E501 + :type: int + """ + + self._short = short + + 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(ByteBuffer, 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, ByteBuffer): + 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/claim_request.py b/tb_rest_client/models/models_ce/claim_request.py index fe6a8700..385e3e9f 100644 --- a/tb_rest_client/models/models_ce/claim_request.py +++ b/tb_rest_client/models/models_ce/claim_request.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 ClaimRequest(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 @@ -41,10 +37,8 @@ class ClaimRequest(object): def __init__(self, secret_key=None): # noqa: E501 """ClaimRequest - a model defined in Swagger""" # noqa: E501 - self._secret_key = None self.discriminator = None - self.secret_key = secret_key @property diff --git a/tb_rest_client/models/models_ce/component_descriptor.py b/tb_rest_client/models/models_ce/component_descriptor.py index 80c1e9ce..1399f002 100644 --- a/tb_rest_client/models/models_ce/component_descriptor.py +++ b/tb_rest_client/models/models_ce/component_descriptor.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 ComponentDescriptor(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 @@ -55,7 +51,6 @@ class ComponentDescriptor(object): def __init__(self, actions=None, clazz=None, configuration_descriptor=None, created_time=None, id=None, name=None, scope=None, type=None): # noqa: E501 """ComponentDescriptor - a model defined in Swagger""" # noqa: E501 - self._actions = None self._clazz = None self._configuration_descriptor = None @@ -65,7 +60,6 @@ def __init__(self, actions=None, clazz=None, configuration_descriptor=None, crea self._scope = None self._type = None self.discriminator = None - if actions is not None: self.actions = actions if clazz is not None: 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 c7bfbc69..12f34bab 100644 --- a/tb_rest_client/models/models_ce/component_descriptor_id.py +++ b/tb_rest_client/models/models_ce/component_descriptor_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 ComponentDescriptorId(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 @@ -41,10 +37,8 @@ class ComponentDescriptorId(object): def __init__(self, id=None): # noqa: E501 """ComponentDescriptorId - a model defined in Swagger""" # noqa: E501 - self._id = None self.discriminator = None - if id is not None: self.id = id diff --git a/tb_rest_client/models/models_ce/customer.py b/tb_rest_client/models/models_ce/customer.py index ae12f827..10ec7e3e 100644 --- a/tb_rest_client/models/models_ce/customer.py +++ b/tb_rest_client/models/models_ce/customer.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Customer(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 @@ -67,7 +63,6 @@ class Customer(object): 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, tenant_id=None, title=None, zip=None): # noqa: E501 """Customer - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._address = None self._address2 = None @@ -83,7 +78,6 @@ def __init__(self, additional_info=None, address=None, address2=None, city=None, self._title = None self._zip = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if address is not None: diff --git a/tb_rest_client/models/models_ce/customer_id.py b/tb_rest_client/models/models_ce/customer_id.py index 87ce4eda..80f87f10 100644 --- a/tb_rest_client/models/models_ce/customer_id.py +++ b/tb_rest_client/models/models_ce/customer_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 CustomerId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -32,70 +28,36 @@ class CustomerId(object): and the value is json key in definition. """ swagger_types = { - 'entity_type': 'str', 'id': 'str' } attribute_map = { - 'entity_type': 'entityType', 'id': 'id' } - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None + def __init__(self, id=None): # noqa: E501 + """CustomerId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type if id is not None: self.id = id - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 + """Gets the id of this CustomerId. # noqa: E501 - :return: The id of this EntityId. # noqa: E501 + :return: The id of this CustomerId. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this EntityId. + """Sets the id of this CustomerId. - :param id: The id of this EntityId. # noqa: E501 + :param id: The id of this CustomerId. # noqa: E501 :type: str """ @@ -122,7 +84,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(self.__class__, dict): + if issubclass(CustomerId, dict): for key, value in self.items(): result[key] = value @@ -138,7 +100,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): + if not isinstance(other, CustomerId): return False return self.__dict__ == other.__dict__ diff --git a/tb_rest_client/models/models_ce/dashboard.py b/tb_rest_client/models/models_ce/dashboard.py index 4113e80e..8076ae08 100644 --- a/tb_rest_client/models/models_ce/dashboard.py +++ b/tb_rest_client/models/models_ce/dashboard.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Dashboard(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -36,6 +32,9 @@ class Dashboard(object): 'configuration': 'str', 'created_time': 'int', 'id': 'DashboardId', + 'image': 'str', + 'mobile_hide': 'bool', + 'mobile_order': 'int', 'name': 'str', 'tenant_id': 'TenantId', 'title': 'str' @@ -46,23 +45,27 @@ class Dashboard(object): 'configuration': 'configuration', 'created_time': 'createdTime', 'id': 'id', + 'image': 'image', + 'mobile_hide': 'mobileHide', + 'mobile_order': 'mobileOrder', 'name': 'name', 'tenant_id': 'tenantId', 'title': 'title' } - def __init__(self, assigned_customers=None, configuration=None, created_time=None, id=None, name=None, tenant_id=None, title=None): # noqa: E501 + def __init__(self, assigned_customers=None, configuration=None, created_time=None, id=None, image=None, mobile_hide=None, mobile_order=None, name=None, tenant_id=None, title=None): # noqa: E501 """Dashboard - a model defined in Swagger""" # noqa: E501 - self._assigned_customers = None self._configuration = None self._created_time = None self._id = None + self._image = None + self._mobile_hide = None + self._mobile_order = None self._name = None self._tenant_id = None self._title = None self.discriminator = None - if assigned_customers is not None: self.assigned_customers = assigned_customers if configuration is not None: @@ -71,6 +74,12 @@ def __init__(self, assigned_customers=None, configuration=None, created_time=Non self.created_time = created_time if id is not None: self.id = id + if image is not None: + self.image = image + if mobile_hide is not None: + self.mobile_hide = mobile_hide + if mobile_order is not None: + self.mobile_order = mobile_order if name is not None: self.name = name if tenant_id is not None: @@ -162,6 +171,69 @@ def id(self, id): self._id = id + @property + def image(self): + """Gets the image of this Dashboard. # noqa: E501 + + + :return: The image of this Dashboard. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this Dashboard. + + + :param image: The image of this Dashboard. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def mobile_hide(self): + """Gets the mobile_hide of this Dashboard. # noqa: E501 + + + :return: The mobile_hide of this Dashboard. # noqa: E501 + :rtype: bool + """ + return self._mobile_hide + + @mobile_hide.setter + def mobile_hide(self, mobile_hide): + """Sets the mobile_hide of this Dashboard. + + + :param mobile_hide: The mobile_hide of this Dashboard. # noqa: E501 + :type: bool + """ + + self._mobile_hide = mobile_hide + + @property + def mobile_order(self): + """Gets the mobile_order of this Dashboard. # noqa: E501 + + + :return: The mobile_order of this Dashboard. # noqa: E501 + :rtype: int + """ + return self._mobile_order + + @mobile_order.setter + def mobile_order(self, mobile_order): + """Sets the mobile_order of this Dashboard. + + + :param mobile_order: The mobile_order of this Dashboard. # noqa: E501 + :type: int + """ + + self._mobile_order = mobile_order + @property def name(self): """Gets the name 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 9f6dadda..77c5359d 100644 --- a/tb_rest_client/models/models_ce/dashboard_id.py +++ b/tb_rest_client/models/models_ce/dashboard_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 DashboardId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -32,70 +28,36 @@ class DashboardId(object): and the value is json key in definition. """ swagger_types = { - 'entity_type': 'str', 'id': 'str' } attribute_map = { - 'entity_type': 'entityType', 'id': 'id' } - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None + def __init__(self, id=None): # noqa: E501 + """DashboardId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type if id is not None: self.id = id - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 + """Gets the id of this DashboardId. # noqa: E501 - :return: The id of this EntityId. # noqa: E501 + :return: The id of this DashboardId. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this EntityId. + """Sets the id of this DashboardId. - :param id: The id of this EntityId. # noqa: E501 + :param id: The id of this DashboardId. # noqa: E501 :type: str """ @@ -122,7 +84,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(self.__class__, dict): + if issubclass(DashboardId, dict): for key, value in self.items(): result[key] = value @@ -130,7 +92,7 @@ def to_dict(self): def to_str(self): """Returns the string representation of the model""" - return self._id #pprint.pformat(self.to_dict()) + return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" @@ -138,7 +100,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): + if not isinstance(other, DashboardId): return False return self.__dict__ == other.__dict__ diff --git a/tb_rest_client/models/models_ce/dashboard_info.py b/tb_rest_client/models/models_ce/dashboard_info.py index 419aa8cc..d696f983 100644 --- a/tb_rest_client/models/models_ce/dashboard_info.py +++ b/tb_rest_client/models/models_ce/dashboard_info.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 DashboardInfo(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 @@ -35,6 +31,9 @@ class DashboardInfo(object): 'assigned_customers': 'list[ShortCustomerInfo]', 'created_time': 'int', 'id': 'DashboardId', + 'image': 'str', + 'mobile_hide': 'bool', + 'mobile_order': 'int', 'name': 'str', 'tenant_id': 'TenantId', 'title': 'str' @@ -44,28 +43,38 @@ class DashboardInfo(object): 'assigned_customers': 'assignedCustomers', 'created_time': 'createdTime', 'id': 'id', + 'image': 'image', + 'mobile_hide': 'mobileHide', + 'mobile_order': 'mobileOrder', 'name': 'name', 'tenant_id': 'tenantId', 'title': 'title' } - def __init__(self, assigned_customers=None, created_time=None, id=None, name=None, tenant_id=None, title=None): # noqa: E501 + def __init__(self, assigned_customers=None, created_time=None, id=None, image=None, mobile_hide=None, mobile_order=None, name=None, tenant_id=None, title=None): # noqa: E501 """DashboardInfo - a model defined in Swagger""" # noqa: E501 - self._assigned_customers = None self._created_time = None self._id = None + self._image = None + self._mobile_hide = None + self._mobile_order = None self._name = None self._tenant_id = None self._title = None self.discriminator = None - if assigned_customers is not None: self.assigned_customers = assigned_customers if created_time is not None: self.created_time = created_time if id is not None: self.id = id + if image is not None: + self.image = image + if mobile_hide is not None: + self.mobile_hide = mobile_hide + if mobile_order is not None: + self.mobile_order = mobile_order if name is not None: self.name = name if tenant_id is not None: @@ -136,6 +145,69 @@ def id(self, id): self._id = id + @property + def image(self): + """Gets the image of this DashboardInfo. # noqa: E501 + + + :return: The image of this DashboardInfo. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this DashboardInfo. + + + :param image: The image of this DashboardInfo. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def mobile_hide(self): + """Gets the mobile_hide of this DashboardInfo. # noqa: E501 + + + :return: The mobile_hide of this DashboardInfo. # noqa: E501 + :rtype: bool + """ + return self._mobile_hide + + @mobile_hide.setter + def mobile_hide(self, mobile_hide): + """Sets the mobile_hide of this DashboardInfo. + + + :param mobile_hide: The mobile_hide of this DashboardInfo. # noqa: E501 + :type: bool + """ + + self._mobile_hide = mobile_hide + + @property + def mobile_order(self): + """Gets the mobile_order of this DashboardInfo. # noqa: E501 + + + :return: The mobile_order of this DashboardInfo. # noqa: E501 + :rtype: int + """ + return self._mobile_order + + @mobile_order.setter + def mobile_order(self, mobile_order): + """Sets the mobile_order of this DashboardInfo. + + + :param mobile_order: The mobile_order of this DashboardInfo. # noqa: E501 + :type: int + """ + + self._mobile_order = mobile_order + @property def name(self): """Gets the name of this DashboardInfo. # noqa: E501 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 new file mode 100644 index 00000000..ad4a7507 --- /dev/null +++ b/tb_rest_client/models/models_ce/default_rule_chain_create_request.py @@ -0,0 +1,110 @@ +# 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 DefaultRuleChainCreateRequest(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 = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None): # noqa: E501 + """DefaultRuleChainCreateRequest - a model defined in Swagger""" # noqa: E501 + self._name = None + self.discriminator = None + if name is not None: + self.name = name + + @property + def name(self): + """Gets the name of this DefaultRuleChainCreateRequest. # noqa: E501 + + + :return: The name of this DefaultRuleChainCreateRequest. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DefaultRuleChainCreateRequest. + + + :param name: The name of this DefaultRuleChainCreateRequest. # noqa: E501 + :type: str + """ + + self._name = 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(DefaultRuleChainCreateRequest, 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, DefaultRuleChainCreateRequest): + 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/deferred_result_response_entity.py b/tb_rest_client/models/models_ce/deferred_result_response_entity.py index 3893fe83..1e0fcf11 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 DeferredResultResponseEntity(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 @@ -43,11 +39,9 @@ class DeferredResultResponseEntity(object): def __init__(self, result=None, set_or_expired=None): # noqa: E501 """DeferredResultResponseEntity - a model defined in Swagger""" # noqa: E501 - self._result = None self._set_or_expired = None self.discriminator = None - if result is not None: self.result = result if set_or_expired is not None: diff --git a/tb_rest_client/models/models_ce/device.py b/tb_rest_client/models/models_ce/device.py index 9c135c89..76523e6d 100644 --- a/tb_rest_client/models/models_ce/device.py +++ b/tb_rest_client/models/models_ce/device.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Device(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 @@ -35,9 +31,13 @@ class Device(object): 'additional_info': 'str', 'created_time': 'int', 'customer_id': 'CustomerId', + 'device_data': 'DeviceData', + 'device_profile_id': 'DeviceProfileId', + 'firmware_id': 'OtaPackageId', 'id': 'DeviceId', 'label': 'str', 'name': 'str', + 'software_id': 'OtaPackageId', 'tenant_id': 'TenantId', 'type': 'str' } @@ -46,39 +46,52 @@ class Device(object): 'additional_info': 'additionalInfo', 'created_time': 'createdTime', 'customer_id': 'customerId', + 'device_data': 'deviceData', + 'device_profile_id': 'deviceProfileId', + 'firmware_id': 'firmwareId', 'id': 'id', 'label': 'label', 'name': 'name', + 'software_id': 'softwareId', 'tenant_id': 'tenantId', 'type': 'type' } - def __init__(self, additional_info=None, created_time=None, customer_id=None, id=None, label=None, name=None, - tenant_id=None, type=None): # noqa: E501 + def __init__(self, additional_info=None, created_time=None, customer_id=None, device_data=None, device_profile_id=None, firmware_id=None, id=None, label=None, name=None, software_id=None, tenant_id=None, type=None): # noqa: E501 """Device - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._created_time = None self._customer_id = None + self._device_data = None + self._device_profile_id = None + self._firmware_id = None self._id = None self._label = None self._name = None + self._software_id = None self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if created_time is not None: self.created_time = created_time if customer_id is not None: self.customer_id = customer_id + if device_data is not None: + self.device_data = device_data + if device_profile_id is not None: + self.device_profile_id = device_profile_id + if firmware_id is not None: + self.firmware_id = firmware_id if id is not None: self.id = id if label is not None: self.label = label if name is not None: self.name = name + if software_id is not None: + self.software_id = software_id if tenant_id is not None: self.tenant_id = tenant_id if type is not None: @@ -147,6 +160,69 @@ def customer_id(self, customer_id): self._customer_id = customer_id + @property + def device_data(self): + """Gets the device_data of this Device. # noqa: E501 + + + :return: The device_data of this Device. # noqa: E501 + :rtype: DeviceData + """ + return self._device_data + + @device_data.setter + def device_data(self, device_data): + """Sets the device_data of this Device. + + + :param device_data: The device_data of this Device. # noqa: E501 + :type: DeviceData + """ + + self._device_data = device_data + + @property + def device_profile_id(self): + """Gets the device_profile_id of this Device. # noqa: E501 + + + :return: The device_profile_id of this Device. # 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 Device. + + + :param device_profile_id: The device_profile_id of this Device. # noqa: E501 + :type: DeviceProfileId + """ + + self._device_profile_id = device_profile_id + + @property + def firmware_id(self): + """Gets the firmware_id of this Device. # noqa: E501 + + + :return: The firmware_id of this Device. # noqa: E501 + :rtype: OtaPackageId + """ + return self._firmware_id + + @firmware_id.setter + def firmware_id(self, firmware_id): + """Sets the firmware_id of this Device. + + + :param firmware_id: The firmware_id of this Device. # noqa: E501 + :type: OtaPackageId + """ + + self._firmware_id = firmware_id + @property def id(self): """Gets the id of this Device. # noqa: E501 @@ -210,6 +286,27 @@ def name(self, name): self._name = name + @property + def software_id(self): + """Gets the software_id of this Device. # noqa: E501 + + + :return: The software_id of this Device. # noqa: E501 + :rtype: OtaPackageId + """ + return self._software_id + + @software_id.setter + def software_id(self, software_id): + """Sets the software_id of this Device. + + + :param software_id: The software_id of this Device. # noqa: E501 + :type: OtaPackageId + """ + + self._software_id = software_id + @property def tenant_id(self): """Gets the tenant_id of this Device. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/device_configuration.py b/tb_rest_client/models/models_ce/device_configuration.py new file mode 100644 index 00000000..8da38954 --- /dev/null +++ b/tb_rest_client/models/models_ce/device_configuration.py @@ -0,0 +1,84 @@ +# 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 DeviceConfiguration(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 + """DeviceConfiguration - 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(DeviceConfiguration, 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, DeviceConfiguration): + 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_credentials.py b/tb_rest_client/models/models_ce/device_credentials.py index 9e1b0495..7b2f1cac 100644 --- a/tb_rest_client/models/models_ce/device_credentials.py +++ b/tb_rest_client/models/models_ce/device_credentials.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 DeviceCredentials(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -51,7 +47,6 @@ class DeviceCredentials(object): def __init__(self, created_time=None, credentials_id=None, credentials_type=None, credentials_value=None, device_id=None, id=None): # noqa: E501 """DeviceCredentials - a model defined in Swagger""" # noqa: E501 - self._created_time = None self._credentials_id = None self._credentials_type = None @@ -59,7 +54,6 @@ def __init__(self, created_time=None, credentials_id=None, credentials_type=None self._device_id = None self._id = None self.discriminator = None - if created_time is not None: self.created_time = created_time if credentials_id is not None: @@ -133,7 +127,7 @@ def credentials_type(self, credentials_type): :param credentials_type: The credentials_type of this DeviceCredentials. # noqa: E501 :type: str """ - allowed_values = ["ACCESS_TOKEN", "X509_CERTIFICATE"] # noqa: E501 + allowed_values = ["ACCESS_TOKEN", "X509_CERTIFICATE", "MQTT_BASIC", "LWM2M_CREDENTIALS"] # noqa: E501 if credentials_type not in allowed_values: raise ValueError( "Invalid value for `credentials_type` ({0}), must be one of {1}" # noqa: E501 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 d6361e8b..899fd969 100644 --- a/tb_rest_client/models/models_ce/device_credentials_id.py +++ b/tb_rest_client/models/models_ce/device_credentials_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 DeviceCredentialsId(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 @@ -41,10 +37,8 @@ class DeviceCredentialsId(object): def __init__(self, id=None): # noqa: E501 """DeviceCredentialsId - a model defined in Swagger""" # noqa: E501 - self._id = None self.discriminator = None - if id is not None: self.id = id diff --git a/tb_rest_client/models/models_ce/device_data.py b/tb_rest_client/models/models_ce/device_data.py new file mode 100644 index 00000000..ca9587d7 --- /dev/null +++ b/tb_rest_client/models/models_ce/device_data.py @@ -0,0 +1,136 @@ +# 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 DeviceData(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': 'DeviceConfiguration', + 'transport_configuration': 'DeviceTransportConfiguration' + } + + attribute_map = { + 'configuration': 'configuration', + 'transport_configuration': 'transportConfiguration' + } + + def __init__(self, configuration=None, transport_configuration=None): # noqa: E501 + """DeviceData - a model defined in Swagger""" # noqa: E501 + self._configuration = None + self._transport_configuration = None + self.discriminator = None + if configuration is not None: + self.configuration = configuration + if transport_configuration is not None: + self.transport_configuration = transport_configuration + + @property + def configuration(self): + """Gets the configuration of this DeviceData. # noqa: E501 + + + :return: The configuration of this DeviceData. # noqa: E501 + :rtype: DeviceConfiguration + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """Sets the configuration of this DeviceData. + + + :param configuration: The configuration of this DeviceData. # noqa: E501 + :type: DeviceConfiguration + """ + + self._configuration = configuration + + @property + def transport_configuration(self): + """Gets the transport_configuration of this DeviceData. # noqa: E501 + + + :return: The transport_configuration of this DeviceData. # noqa: E501 + :rtype: DeviceTransportConfiguration + """ + return self._transport_configuration + + @transport_configuration.setter + def transport_configuration(self, transport_configuration): + """Sets the transport_configuration of this DeviceData. + + + :param transport_configuration: The transport_configuration of this DeviceData. # noqa: E501 + :type: DeviceTransportConfiguration + """ + + self._transport_configuration = transport_configuration + + 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(DeviceData, 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, DeviceData): + 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_id.py b/tb_rest_client/models/models_ce/device_id.py index 1ad0a29a..6fbb843c 100644 --- a/tb_rest_client/models/models_ce/device_id.py +++ b/tb_rest_client/models/models_ce/device_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 DeviceId(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 @@ -32,70 +28,36 @@ class DeviceId(object): and the value is json key in definition. """ swagger_types = { - 'entity_type': 'str', 'id': 'str' } attribute_map = { - 'entity_type': 'entityType', 'id': 'id' } - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None + def __init__(self, id=None): # noqa: E501 + """DeviceId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type if id is not None: self.id = id - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 + """Gets the id of this DeviceId. # noqa: E501 - :return: The id of this EntityId. # noqa: E501 + :return: The id of this DeviceId. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this EntityId. + """Sets the id of this DeviceId. - :param id: The id of this EntityId. # noqa: E501 + :param id: The id of this DeviceId. # noqa: E501 :type: str """ @@ -122,7 +84,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(self.__class__, dict): + if issubclass(DeviceId, dict): for key, value in self.items(): result[key] = value @@ -138,7 +100,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): + if not isinstance(other, DeviceId): return False return self.__dict__ == other.__dict__ diff --git a/tb_rest_client/models/models_ce/device_info.py b/tb_rest_client/models/models_ce/device_info.py new file mode 100644 index 00000000..08921260 --- /dev/null +++ b/tb_rest_client/models/models_ce/device_info.py @@ -0,0 +1,474 @@ +# 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 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 = { + 'additional_info': 'str', + 'created_time': 'int', + 'customer_id': 'CustomerId', + 'customer_is_public': 'bool', + 'customer_title': 'str', + 'device_data': 'DeviceData', + 'device_profile_id': 'DeviceProfileId', + 'device_profile_name': 'str', + 'firmware_id': 'OtaPackageId', + 'id': 'DeviceId', + 'label': 'str', + 'name': 'str', + 'software_id': 'OtaPackageId', + 'tenant_id': 'TenantId', + 'type': 'str' + } + + attribute_map = { + 'additional_info': 'additionalInfo', + 'created_time': 'createdTime', + 'customer_id': 'customerId', + 'customer_is_public': 'customerIsPublic', + 'customer_title': 'customerTitle', + 'device_data': 'deviceData', + 'device_profile_id': 'deviceProfileId', + 'device_profile_name': 'deviceProfileName', + 'firmware_id': 'firmwareId', + 'id': 'id', + 'label': 'label', + 'name': 'name', + 'software_id': 'softwareId', + 'tenant_id': 'tenantId', + 'type': 'type' + } + + def __init__(self, additional_info=None, created_time=None, customer_id=None, customer_is_public=None, customer_title=None, device_data=None, device_profile_id=None, device_profile_name=None, firmware_id=None, id=None, label=None, name=None, software_id=None, tenant_id=None, type=None): # noqa: E501 + """DeviceInfo - a model defined in Swagger""" # noqa: E501 + self._additional_info = None + self._created_time = None + self._customer_id = None + self._customer_is_public = None + self._customer_title = None + self._device_data = None + self._device_profile_id = None + self._device_profile_name = None + self._firmware_id = None + self._id = None + self._label = None + self._name = None + self._software_id = None + self._tenant_id = None + self._type = None + self.discriminator = None + if additional_info is not None: + self.additional_info = additional_info + if created_time is not None: + self.created_time = created_time + if customer_id is not None: + self.customer_id = customer_id + if customer_is_public is not None: + self.customer_is_public = customer_is_public + if customer_title is not None: + self.customer_title = customer_title + if device_data is not None: + self.device_data = device_data + if device_profile_id is not None: + self.device_profile_id = device_profile_id + if device_profile_name is not None: + self.device_profile_name = device_profile_name + if firmware_id is not None: + self.firmware_id = firmware_id + if id is not None: + self.id = id + if label is not None: + self.label = label + if name is not None: + self.name = name + if software_id is not None: + self.software_id = software_id + if tenant_id is not None: + self.tenant_id = tenant_id + if type is not None: + self.type = type + + @property + def additional_info(self): + """Gets the additional_info of this DeviceInfo. # noqa: E501 + + + :return: The additional_info of this DeviceInfo. # noqa: E501 + :rtype: str + """ + 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: str + """ + + self._additional_info = additional_info + + @property + def created_time(self): + """Gets the created_time of this DeviceInfo. # 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. + + + :param created_time: The created_time of this DeviceInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @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 customer_is_public(self): + """Gets the customer_is_public of this DeviceInfo. # noqa: E501 + + + :return: The customer_is_public of this DeviceInfo. # noqa: E501 + :rtype: bool + """ + return self._customer_is_public + + @customer_is_public.setter + def customer_is_public(self, customer_is_public): + """Sets the customer_is_public of this DeviceInfo. + + + :param customer_is_public: The customer_is_public of this DeviceInfo. # noqa: E501 + :type: bool + """ + + self._customer_is_public = customer_is_public + + @property + def customer_title(self): + """Gets the customer_title of this DeviceInfo. # noqa: E501 + + + :return: The customer_title of this DeviceInfo. # noqa: E501 + :rtype: str + """ + return self._customer_title + + @customer_title.setter + def customer_title(self, customer_title): + """Sets the customer_title of this DeviceInfo. + + + :param customer_title: The customer_title of this DeviceInfo. # noqa: E501 + :type: str + """ + + self._customer_title = customer_title + + @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 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 + """ + + self._device_profile_id = device_profile_id + + @property + def device_profile_name(self): + """Gets the device_profile_name of this DeviceInfo. # noqa: E501 + + + :return: The device_profile_name of this DeviceInfo. # noqa: E501 + :rtype: str + """ + return self._device_profile_name + + @device_profile_name.setter + def device_profile_name(self, device_profile_name): + """Sets the device_profile_name of this DeviceInfo. + + + :param device_profile_name: The device_profile_name of this DeviceInfo. # noqa: E501 + :type: str + """ + + self._device_profile_name = device_profile_name + + @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 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 label(self): + """Gets the label of this DeviceInfo. # 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. + + + :param label: The label of this DeviceInfo. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def name(self): + """Gets the name of this DeviceInfo. # 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. + + + :param name: The name of this DeviceInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @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 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 type(self): + """Gets the type of this DeviceInfo. # 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. + + + :param type: The type of this DeviceInfo. # noqa: E501 + :type: str + """ + + 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(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_ce/device_profile.py b/tb_rest_client/models/models_ce/device_profile.py index 687e5b78..77b36468 100644 --- a/tb_rest_client/models/models_ce/device_profile.py +++ b/tb_rest_client/models/models_ce/device_profile.py @@ -10,19 +10,16 @@ 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 @@ -70,12 +67,8 @@ class DeviceProfile(object): 'type': 'type' } - def __init__(self, created_time=None, default=None, default_dashboard_id=None, default_queue_name=None, default_rule_chain_id=None, description=None, firmware_id=None, id=None, image=None, name=None, profile_data=None, provision_device_key=None, provision_type=None, software_id=None, tenant_id=None, transport_type=None, type=None, _configuration=None): # noqa: E501 + def __init__(self, created_time=None, default=None, default_dashboard_id=None, default_queue_name=None, default_rule_chain_id=None, description=None, firmware_id=None, id=None, image=None, name=None, profile_data=None, provision_device_key=None, provision_type=None, software_id=None, tenant_id=None, transport_type=None, type=None): # noqa: E501 """DeviceProfile - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._created_time = None self._default = None self._default_dashboard_id = None @@ -94,7 +87,6 @@ def __init__(self, created_time=None, default=None, default_dashboard_id=None, d self._transport_type = None self._type = None self.discriminator = None - if created_time is not None: self.created_time = created_time if default is not None: @@ -401,8 +393,7 @@ def provision_type(self, provision_type): :type: str """ allowed_values = ["DISABLED", "ALLOW_CREATE_NEW_DEVICES", "CHECK_PRE_PROVISIONED_DEVICES"] # noqa: E501 - if (self._configuration.client_side_validation and - provision_type not in allowed_values): + 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) @@ -471,8 +462,7 @@ def transport_type(self, transport_type): :type: str """ allowed_values = ["DEFAULT", "MQTT", "COAP", "LWM2M", "SNMP"] # noqa: E501 - if (self._configuration.client_side_validation and - transport_type not in allowed_values): + 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) @@ -499,8 +489,7 @@ def type(self, type): :type: str """ allowed_values = ["DEFAULT"] # noqa: E501 - if (self._configuration.client_side_validation and - type not in allowed_values): + if type not in allowed_values: raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -548,11 +537,8 @@ def __eq__(self, other): if not isinstance(other, DeviceProfile): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, DeviceProfile): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other diff --git a/tb_rest_client/models/models_ce/device_profile_alarm.py b/tb_rest_client/models/models_ce/device_profile_alarm.py new file mode 100644 index 00000000..0aec2f9b --- /dev/null +++ b/tb_rest_client/models/models_ce/device_profile_alarm.py @@ -0,0 +1,240 @@ +# 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 DeviceProfileAlarm(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_type': 'str', + 'clear_rule': 'AlarmRule', + 'create_rules': 'dict(str, AlarmRule)', + 'id': 'str', + 'propagate': 'bool', + 'propagate_relation_types': 'list[str]' + } + + attribute_map = { + 'alarm_type': 'alarmType', + 'clear_rule': 'clearRule', + 'create_rules': 'createRules', + 'id': 'id', + 'propagate': 'propagate', + 'propagate_relation_types': 'propagateRelationTypes' + } + + def __init__(self, alarm_type=None, clear_rule=None, create_rules=None, id=None, propagate=None, propagate_relation_types=None): # noqa: E501 + """DeviceProfileAlarm - a model defined in Swagger""" # noqa: E501 + self._alarm_type = None + self._clear_rule = None + self._create_rules = None + self._id = None + self._propagate = None + self._propagate_relation_types = None + self.discriminator = None + if alarm_type is not None: + self.alarm_type = alarm_type + if clear_rule is not None: + self.clear_rule = clear_rule + if create_rules is not None: + self.create_rules = create_rules + if id is not None: + self.id = id + if propagate is not None: + self.propagate = propagate + if propagate_relation_types is not None: + self.propagate_relation_types = propagate_relation_types + + @property + def alarm_type(self): + """Gets the alarm_type of this DeviceProfileAlarm. # noqa: E501 + + + :return: The alarm_type of this DeviceProfileAlarm. # noqa: E501 + :rtype: str + """ + return self._alarm_type + + @alarm_type.setter + def alarm_type(self, alarm_type): + """Sets the alarm_type of this DeviceProfileAlarm. + + + :param alarm_type: The alarm_type of this DeviceProfileAlarm. # noqa: E501 + :type: str + """ + + self._alarm_type = alarm_type + + @property + def clear_rule(self): + """Gets the clear_rule of this DeviceProfileAlarm. # noqa: E501 + + + :return: The clear_rule of this DeviceProfileAlarm. # noqa: E501 + :rtype: AlarmRule + """ + return self._clear_rule + + @clear_rule.setter + def clear_rule(self, clear_rule): + """Sets the clear_rule of this DeviceProfileAlarm. + + + :param clear_rule: The clear_rule of this DeviceProfileAlarm. # noqa: E501 + :type: AlarmRule + """ + + self._clear_rule = clear_rule + + @property + def create_rules(self): + """Gets the create_rules of this DeviceProfileAlarm. # noqa: E501 + + + :return: The create_rules of this DeviceProfileAlarm. # noqa: E501 + :rtype: dict(str, AlarmRule) + """ + return self._create_rules + + @create_rules.setter + def create_rules(self, create_rules): + """Sets the create_rules of this DeviceProfileAlarm. + + + :param create_rules: The create_rules of this DeviceProfileAlarm. # noqa: E501 + :type: dict(str, AlarmRule) + """ + + self._create_rules = create_rules + + @property + def id(self): + """Gets the id of this DeviceProfileAlarm. # noqa: E501 + + + :return: The id of this DeviceProfileAlarm. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DeviceProfileAlarm. + + + :param id: The id of this DeviceProfileAlarm. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def propagate(self): + """Gets the propagate of this DeviceProfileAlarm. # noqa: E501 + + + :return: The propagate of this DeviceProfileAlarm. # noqa: E501 + :rtype: bool + """ + return self._propagate + + @propagate.setter + def propagate(self, propagate): + """Sets the propagate of this DeviceProfileAlarm. + + + :param propagate: The propagate of this DeviceProfileAlarm. # noqa: E501 + :type: bool + """ + + self._propagate = propagate + + @property + def propagate_relation_types(self): + """Gets the propagate_relation_types of this DeviceProfileAlarm. # noqa: E501 + + + :return: The propagate_relation_types of this DeviceProfileAlarm. # noqa: E501 + :rtype: list[str] + """ + return self._propagate_relation_types + + @propagate_relation_types.setter + def propagate_relation_types(self, propagate_relation_types): + """Sets the propagate_relation_types of this DeviceProfileAlarm. + + + :param propagate_relation_types: The propagate_relation_types of this DeviceProfileAlarm. # noqa: E501 + :type: list[str] + """ + + self._propagate_relation_types = propagate_relation_types + + 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(DeviceProfileAlarm, 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, DeviceProfileAlarm): + 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_profile_configuration.py b/tb_rest_client/models/models_ce/device_profile_configuration.py new file mode 100644 index 00000000..a7abe89d --- /dev/null +++ b/tb_rest_client/models/models_ce/device_profile_configuration.py @@ -0,0 +1,84 @@ +# 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 DeviceProfileConfiguration(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 + """DeviceProfileConfiguration - 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(DeviceProfileConfiguration, 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, DeviceProfileConfiguration): + 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_profile_data.py b/tb_rest_client/models/models_ce/device_profile_data.py new file mode 100644 index 00000000..cbe0af31 --- /dev/null +++ b/tb_rest_client/models/models_ce/device_profile_data.py @@ -0,0 +1,188 @@ +# 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 DeviceProfileData(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': 'list[DeviceProfileAlarm]', + 'configuration': 'DeviceProfileConfiguration', + 'provision_configuration': 'DeviceProfileProvisionConfiguration', + 'transport_configuration': 'DeviceProfileTransportConfiguration' + } + + attribute_map = { + 'alarms': 'alarms', + 'configuration': 'configuration', + 'provision_configuration': 'provisionConfiguration', + 'transport_configuration': 'transportConfiguration' + } + + def __init__(self, alarms=None, configuration=None, provision_configuration=None, transport_configuration=None): # noqa: E501 + """DeviceProfileData - a model defined in Swagger""" # noqa: E501 + self._alarms = None + self._configuration = None + self._provision_configuration = None + self._transport_configuration = None + self.discriminator = None + if alarms is not None: + self.alarms = alarms + if configuration is not None: + self.configuration = configuration + if provision_configuration is not None: + self.provision_configuration = provision_configuration + if transport_configuration is not None: + self.transport_configuration = transport_configuration + + @property + def alarms(self): + """Gets the alarms of this DeviceProfileData. # noqa: E501 + + + :return: The alarms of this DeviceProfileData. # noqa: E501 + :rtype: list[DeviceProfileAlarm] + """ + return self._alarms + + @alarms.setter + def alarms(self, alarms): + """Sets the alarms of this DeviceProfileData. + + + :param alarms: The alarms of this DeviceProfileData. # noqa: E501 + :type: list[DeviceProfileAlarm] + """ + + self._alarms = alarms + + @property + def configuration(self): + """Gets the configuration of this DeviceProfileData. # noqa: E501 + + + :return: The configuration of this DeviceProfileData. # noqa: E501 + :rtype: DeviceProfileConfiguration + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """Sets the configuration of this DeviceProfileData. + + + :param configuration: The configuration of this DeviceProfileData. # noqa: E501 + :type: DeviceProfileConfiguration + """ + + self._configuration = configuration + + @property + def provision_configuration(self): + """Gets the provision_configuration of this DeviceProfileData. # noqa: E501 + + + :return: The provision_configuration of this DeviceProfileData. # noqa: E501 + :rtype: DeviceProfileProvisionConfiguration + """ + return self._provision_configuration + + @provision_configuration.setter + def provision_configuration(self, provision_configuration): + """Sets the provision_configuration of this DeviceProfileData. + + + :param provision_configuration: The provision_configuration of this DeviceProfileData. # noqa: E501 + :type: DeviceProfileProvisionConfiguration + """ + + self._provision_configuration = provision_configuration + + @property + def transport_configuration(self): + """Gets the transport_configuration of this DeviceProfileData. # noqa: E501 + + + :return: The transport_configuration of this DeviceProfileData. # noqa: E501 + :rtype: DeviceProfileTransportConfiguration + """ + return self._transport_configuration + + @transport_configuration.setter + def transport_configuration(self, transport_configuration): + """Sets the transport_configuration of this DeviceProfileData. + + + :param transport_configuration: The transport_configuration of this DeviceProfileData. # noqa: E501 + :type: DeviceProfileTransportConfiguration + """ + + self._transport_configuration = transport_configuration + + 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(DeviceProfileData, 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, DeviceProfileData): + 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_profile_id.py b/tb_rest_client/models/models_ce/device_profile_id.py index bc1ad7a1..e8d6ea06 100644 --- a/tb_rest_client/models/models_ce/device_profile_id.py +++ b/tb_rest_client/models/models_ce/device_profile_id.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class DeviceProfileId(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 @@ -38,15 +35,10 @@ class DeviceProfileId(object): 'id': 'id' } - def __init__(self, id=None, _configuration=None): # noqa: E501 + def __init__(self, id=None): # noqa: E501 """DeviceProfileId - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._id = None self.discriminator = None - if id is not None: self.id = id @@ -111,11 +103,8 @@ def __eq__(self, other): if not isinstance(other, DeviceProfileId): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, DeviceProfileId): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other diff --git a/tb_rest_client/models/models_ce/device_profile_info.py b/tb_rest_client/models/models_ce/device_profile_info.py new file mode 100644 index 00000000..00cd2454 --- /dev/null +++ b/tb_rest_client/models/models_ce/device_profile_info.py @@ -0,0 +1,252 @@ +# 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 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 = { + 'default_dashboard_id': 'DashboardId', + 'id': 'EntityId', + 'image': 'str', + 'name': 'str', + 'transport_type': 'str', + 'type': 'str' + } + + attribute_map = { + 'default_dashboard_id': 'defaultDashboardId', + 'id': 'id', + 'image': 'image', + 'name': 'name', + 'transport_type': 'transportType', + 'type': 'type' + } + + def __init__(self, default_dashboard_id=None, id=None, image=None, name=None, transport_type=None, type=None): # noqa: E501 + """DeviceProfileInfo - a model defined in Swagger""" # noqa: E501 + self._default_dashboard_id = None + self._id = None + self._image = None + self._name = None + self._transport_type = None + self._type = None + self.discriminator = None + if default_dashboard_id is not None: + self.default_dashboard_id = default_dashboard_id + if id is not None: + self.id = id + if image is not None: + self.image = image + if name is not None: + self.name = name + if transport_type is not None: + self.transport_type = transport_type + if type is not None: + self.type = type + + @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 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 image(self): + """Gets the image of this DeviceProfileInfo. # 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. + + + :param image: The image of this DeviceProfileInfo. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def name(self): + """Gets the name of this DeviceProfileInfo. # 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. + + + :param name: The name of this DeviceProfileInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def transport_type(self): + """Gets the transport_type of this DeviceProfileInfo. # 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. + + + :param transport_type: The transport_type of this DeviceProfileInfo. # noqa: E501 + :type: str + """ + allowed_values = ["DEFAULT", "MQTT", "COAP", "LWM2M", "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 type(self): + """Gets the type of this DeviceProfileInfo. # 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. + + + :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 + + 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_ce/device_profile_provision_configuration.py b/tb_rest_client/models/models_ce/device_profile_provision_configuration.py new file mode 100644 index 00000000..bff208a6 --- /dev/null +++ b/tb_rest_client/models/models_ce/device_profile_provision_configuration.py @@ -0,0 +1,110 @@ +# 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 DeviceProfileProvisionConfiguration(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 = { + 'provision_device_secret': 'str' + } + + attribute_map = { + 'provision_device_secret': 'provisionDeviceSecret' + } + + def __init__(self, provision_device_secret=None): # noqa: E501 + """DeviceProfileProvisionConfiguration - a model defined in Swagger""" # noqa: E501 + self._provision_device_secret = None + self.discriminator = None + if provision_device_secret is not None: + self.provision_device_secret = provision_device_secret + + @property + def provision_device_secret(self): + """Gets the provision_device_secret of this DeviceProfileProvisionConfiguration. # noqa: E501 + + + :return: The provision_device_secret of this DeviceProfileProvisionConfiguration. # 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 DeviceProfileProvisionConfiguration. + + + :param provision_device_secret: The provision_device_secret of this DeviceProfileProvisionConfiguration. # 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(DeviceProfileProvisionConfiguration, 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, DeviceProfileProvisionConfiguration): + 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_profile_transport_configuration.py b/tb_rest_client/models/models_ce/device_profile_transport_configuration.py new file mode 100644 index 00000000..1f65fdcb --- /dev/null +++ b/tb_rest_client/models/models_ce/device_profile_transport_configuration.py @@ -0,0 +1,84 @@ +# 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 DeviceProfileTransportConfiguration(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 + """DeviceProfileTransportConfiguration - 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(DeviceProfileTransportConfiguration, 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, DeviceProfileTransportConfiguration): + 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_search_query.py b/tb_rest_client/models/models_ce/device_search_query.py index 99d1ba2c..74c0cfdb 100644 --- a/tb_rest_client/models/models_ce/device_search_query.py +++ b/tb_rest_client/models/models_ce/device_search_query.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 DeviceSearchQuery(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 @@ -45,12 +41,10 @@ class DeviceSearchQuery(object): def __init__(self, device_types=None, parameters=None, relation_type=None): # noqa: E501 """DeviceSearchQuery - a model defined in Swagger""" # noqa: E501 - self._device_types = None self._parameters = None self._relation_type = None self.discriminator = None - if device_types is not None: self.device_types = device_types if parameters is not None: diff --git a/tb_rest_client/models/models_ce/device_transport_configuration.py b/tb_rest_client/models/models_ce/device_transport_configuration.py new file mode 100644 index 00000000..caa2f9af --- /dev/null +++ b/tb_rest_client/models/models_ce/device_transport_configuration.py @@ -0,0 +1,84 @@ +# 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 DeviceTransportConfiguration(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 + """DeviceTransportConfiguration - 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(DeviceTransportConfiguration, 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, DeviceTransportConfiguration): + 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.py b/tb_rest_client/models/models_ce/edge.py index a01a83cf..64b6d218 100644 --- a/tb_rest_client/models/models_ce/edge.py +++ b/tb_rest_client/models/models_ce/edge.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class Edge(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 @@ -62,12 +59,8 @@ class Edge(object): 'type': 'type' } - def __init__(self, additional_info=None, cloud_endpoint=None, created_time=None, customer_id=None, edge_license_key=None, id=None, label=None, name=None, root_rule_chain_id=None, routing_key=None, secret=None, tenant_id=None, type=None, _configuration=None): # noqa: E501 + def __init__(self, additional_info=None, cloud_endpoint=None, created_time=None, customer_id=None, edge_license_key=None, id=None, label=None, name=None, root_rule_chain_id=None, routing_key=None, secret=None, tenant_id=None, type=None): # noqa: E501 """Edge - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._additional_info = None self._cloud_endpoint = None self._created_time = None @@ -82,7 +75,6 @@ def __init__(self, additional_info=None, cloud_endpoint=None, created_time=None, self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if cloud_endpoint is not None: @@ -423,11 +415,8 @@ def __eq__(self, other): if not isinstance(other, Edge): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, Edge): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other diff --git a/tb_rest_client/models/models_ce/edge_event.py b/tb_rest_client/models/models_ce/edge_event.py index f59a053e..dadcb984 100644 --- a/tb_rest_client/models/models_ce/edge_event.py +++ b/tb_rest_client/models/models_ce/edge_event.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class EdgeEvent(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 @@ -54,12 +51,8 @@ class EdgeEvent(object): 'uid': 'uid' } - def __init__(self, action=None, body=None, created_time=None, edge_id=None, entity_id=None, id=None, tenant_id=None, type=None, uid=None, _configuration=None): # noqa: E501 + def __init__(self, action=None, body=None, created_time=None, edge_id=None, entity_id=None, id=None, tenant_id=None, type=None, uid=None): # noqa: E501 """EdgeEvent - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._action = None self._body = None self._created_time = None @@ -70,7 +63,6 @@ def __init__(self, action=None, body=None, created_time=None, edge_id=None, enti self._type = None self._uid = None self.discriminator = None - if action is not None: self.action = action if body is not None: @@ -109,8 +101,7 @@ def action(self, action): :type: str """ allowed_values = ["ADDED", "DELETED", "UPDATED", "POST_ATTRIBUTES", "ATTRIBUTES_UPDATED", "ATTRIBUTES_DELETED", "TIMESERIES_UPDATED", "CREDENTIALS_UPDATED", "ASSIGNED_TO_CUSTOMER", "UNASSIGNED_FROM_CUSTOMER", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "RPC_CALL", "ALARM_ACK", "ALARM_CLEAR", "ASSIGNED_TO_EDGE", "UNASSIGNED_FROM_EDGE", "CREDENTIALS_REQUEST", "ENTITY_MERGE_REQUEST"] # noqa: E501 - if (self._configuration.client_side_validation and - action not in allowed_values): + if action not in allowed_values: raise ValueError( "Invalid value for `action` ({0}), must be one of {1}" # noqa: E501 .format(action, allowed_values) @@ -263,8 +254,7 @@ def type(self, type): :type: str """ allowed_values = ["DASHBOARD", "ASSET", "DEVICE", "DEVICE_PROFILE", "ENTITY_VIEW", "ALARM", "RULE_CHAIN", "RULE_CHAIN_METADATA", "EDGE", "USER", "CUSTOMER", "RELATION", "TENANT", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ADMIN_SETTINGS"] # noqa: E501 - if (self._configuration.client_side_validation and - type not in allowed_values): + if type not in allowed_values: raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -333,11 +323,8 @@ def __eq__(self, other): if not isinstance(other, EdgeEvent): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, EdgeEvent): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 d9d487a4..dff870bc 100644 --- a/tb_rest_client/models/models_ce/edge_event_id.py +++ b/tb_rest_client/models/models_ce/edge_event_id.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class EdgeEventId(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 @@ -38,15 +35,10 @@ class EdgeEventId(object): 'id': 'id' } - def __init__(self, id=None, _configuration=None): # noqa: E501 + def __init__(self, id=None): # noqa: E501 """EdgeEventId - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._id = None self.discriminator = None - if id is not None: self.id = id @@ -111,11 +103,8 @@ def __eq__(self, other): if not isinstance(other, EdgeEventId): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, EdgeEventId): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other diff --git a/tb_rest_client/models/models_ce/edge_id.py b/tb_rest_client/models/models_ce/edge_id.py index fac90dc8..d8ef13e6 100644 --- a/tb_rest_client/models/models_ce/edge_id.py +++ b/tb_rest_client/models/models_ce/edge_id.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class EdgeId(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 @@ -38,15 +35,10 @@ class EdgeId(object): 'id': 'id' } - def __init__(self, id=None, _configuration=None): # noqa: E501 + def __init__(self, id=None): # noqa: E501 """EdgeId - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._id = None self.discriminator = None - if id is not None: self.id = id @@ -111,11 +103,8 @@ def __eq__(self, other): if not isinstance(other, EdgeId): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, EdgeId): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other diff --git a/tb_rest_client/models/models_ce/edge_info.py b/tb_rest_client/models/models_ce/edge_info.py index c4cc1d0a..4a100ab2 100644 --- a/tb_rest_client/models/models_ce/edge_info.py +++ b/tb_rest_client/models/models_ce/edge_info.py @@ -10,19 +10,16 @@ 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 @@ -66,12 +63,8 @@ class EdgeInfo(object): 'type': 'type' } - def __init__(self, additional_info=None, cloud_endpoint=None, created_time=None, customer_id=None, customer_is_public=None, customer_title=None, edge_license_key=None, id=None, label=None, name=None, root_rule_chain_id=None, routing_key=None, secret=None, tenant_id=None, type=None, _configuration=None): # noqa: E501 + def __init__(self, additional_info=None, cloud_endpoint=None, created_time=None, customer_id=None, customer_is_public=None, customer_title=None, edge_license_key=None, id=None, label=None, name=None, root_rule_chain_id=None, routing_key=None, secret=None, tenant_id=None, type=None): # noqa: E501 """EdgeInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._additional_info = None self._cloud_endpoint = None self._created_time = None @@ -88,7 +81,6 @@ def __init__(self, additional_info=None, cloud_endpoint=None, created_time=None, self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if cloud_endpoint is not None: @@ -475,11 +467,8 @@ def __eq__(self, other): if not isinstance(other, EdgeInfo): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, EdgeInfo): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + 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 4bf47254..daf0fbcf 100644 --- a/tb_rest_client/models/models_ce/edge_search_query.py +++ b/tb_rest_client/models/models_ce/edge_search_query.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class EdgeSearchQuery(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 @@ -42,17 +39,12 @@ class EdgeSearchQuery(object): 'relation_type': 'relationType' } - def __init__(self, edge_types=None, parameters=None, relation_type=None, _configuration=None): # noqa: E501 + def __init__(self, edge_types=None, parameters=None, relation_type=None): # noqa: E501 """EdgeSearchQuery - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._edge_types = None self._parameters = None self._relation_type = None self.discriminator = None - if edge_types is not None: self.edge_types = edge_types if parameters is not None: @@ -163,11 +155,8 @@ def __eq__(self, other): if not isinstance(other, EdgeSearchQuery): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, EdgeSearchQuery): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + 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 new file mode 100644 index 00000000..5a8d68d9 --- /dev/null +++ b/tb_rest_client/models/models_ce/entity_count_query.py @@ -0,0 +1,136 @@ +# 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 EntityCountQuery(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 = { + 'entity_filter': 'EntityFilter', + 'key_filters': 'list[KeyFilter]' + } + + attribute_map = { + 'entity_filter': 'entityFilter', + 'key_filters': 'keyFilters' + } + + def __init__(self, entity_filter=None, key_filters=None): # noqa: E501 + """EntityCountQuery - a model defined in Swagger""" # noqa: E501 + self._entity_filter = None + self._key_filters = None + self.discriminator = None + if entity_filter is not None: + self.entity_filter = entity_filter + if key_filters is not None: + self.key_filters = key_filters + + @property + def entity_filter(self): + """Gets the entity_filter of this EntityCountQuery. # noqa: E501 + + + :return: The entity_filter of this EntityCountQuery. # noqa: E501 + :rtype: EntityFilter + """ + return self._entity_filter + + @entity_filter.setter + def entity_filter(self, entity_filter): + """Sets the entity_filter of this EntityCountQuery. + + + :param entity_filter: The entity_filter of this EntityCountQuery. # noqa: E501 + :type: EntityFilter + """ + + self._entity_filter = entity_filter + + @property + def key_filters(self): + """Gets the key_filters of this EntityCountQuery. # noqa: E501 + + + :return: The key_filters of this EntityCountQuery. # noqa: E501 + :rtype: list[KeyFilter] + """ + return self._key_filters + + @key_filters.setter + def key_filters(self, key_filters): + """Sets the key_filters of this EntityCountQuery. + + + :param key_filters: The key_filters of this EntityCountQuery. # noqa: E501 + :type: list[KeyFilter] + """ + + self._key_filters = key_filters + + 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(EntityCountQuery, 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, EntityCountQuery): + 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_data.py b/tb_rest_client/models/models_ce/entity_data.py new file mode 100644 index 00000000..b8f99b27 --- /dev/null +++ b/tb_rest_client/models/models_ce/entity_data.py @@ -0,0 +1,162 @@ +# 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 EntityData(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 = { + 'entity_id': 'EntityId', + 'latest': 'dict(str, dict(str, TsValue))', + 'timeseries': 'dict(str, list[TsValue])' + } + + attribute_map = { + 'entity_id': 'entityId', + 'latest': 'latest', + 'timeseries': 'timeseries' + } + + def __init__(self, entity_id=None, latest=None, timeseries=None): # noqa: E501 + """EntityData - a model defined in Swagger""" # noqa: E501 + self._entity_id = None + self._latest = None + self._timeseries = None + self.discriminator = None + if entity_id is not None: + self.entity_id = entity_id + if latest is not None: + self.latest = latest + if timeseries is not None: + self.timeseries = timeseries + + @property + def entity_id(self): + """Gets the entity_id of this EntityData. # noqa: E501 + + + :return: The entity_id of this EntityData. # noqa: E501 + :rtype: EntityId + """ + return self._entity_id + + @entity_id.setter + def entity_id(self, entity_id): + """Sets the entity_id of this EntityData. + + + :param entity_id: The entity_id of this EntityData. # noqa: E501 + :type: EntityId + """ + + self._entity_id = entity_id + + @property + def latest(self): + """Gets the latest of this EntityData. # noqa: E501 + + + :return: The latest of this EntityData. # noqa: E501 + :rtype: dict(str, dict(str, TsValue)) + """ + return self._latest + + @latest.setter + def latest(self, latest): + """Sets the latest of this EntityData. + + + :param latest: The latest of this EntityData. # noqa: E501 + :type: dict(str, dict(str, TsValue)) + """ + + self._latest = latest + + @property + def timeseries(self): + """Gets the timeseries of this EntityData. # noqa: E501 + + + :return: The timeseries of this EntityData. # noqa: E501 + :rtype: dict(str, list[TsValue]) + """ + return self._timeseries + + @timeseries.setter + def timeseries(self, timeseries): + """Sets the timeseries of this EntityData. + + + :param timeseries: The timeseries of this EntityData. # noqa: E501 + :type: dict(str, list[TsValue]) + """ + + self._timeseries = timeseries + + 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(EntityData, 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, EntityData): + 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_data_page_link.py b/tb_rest_client/models/models_ce/entity_data_page_link.py new file mode 100644 index 00000000..1c711a0a --- /dev/null +++ b/tb_rest_client/models/models_ce/entity_data_page_link.py @@ -0,0 +1,219 @@ +# 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 EntityDataPageLink(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 = { + 'page_size': 'int', + 'page': 'int', + 'text_search': 'str', + 'sort_order': 'EntityDataSortOrder', + 'dynamic': 'bool' + } + + attribute_map = { + 'page_size': 'pageSize', + 'page': 'page', + 'text_search': 'textSearch', + 'sort_order': 'sortOrder', + 'dynamic': 'dynamic' + } + + def __init__(self, page_size=None, page=None, text_search=None, sort_order=None, dynamic=None): # noqa: E501 + """EntityDataPageLink - a model defined in Swagger""" # noqa: E501 + self._page_size = None + self._page = None + self._text_search = None + self._sort_order = None + self._dynamic = None + self.discriminator = None + self.page_size = page_size + self.page = page + self.text_search = text_search + self.sort_order = sort_order + self.dynamic = dynamic + + @property + def page_size(self): + """Gets the page_size of this EntityDataPageLink. # noqa: E501 + + + :return: The page_size of this EntityDataPageLink. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this EntityDataPageLink. + + + :param page_size: The page_size of this EntityDataPageLink. # noqa: E501 + :type: int + """ + if page_size is None: + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + @property + def page(self): + """Gets the page of this EntityDataPageLink. # noqa: E501 + + + :return: The page of this EntityDataPageLink. # noqa: E501 + :rtype: int + """ + return self._page + + @page.setter + def page(self, page): + """Sets the page of this EntityDataPageLink. + + + :param page: The page of this EntityDataPageLink. # noqa: E501 + :type: int + """ + if page is None: + raise ValueError("Invalid value for `page`, must not be `None`") # noqa: E501 + + self._page = page + + @property + def text_search(self): + """Gets the text_search of this EntityDataPageLink. # noqa: E501 + + + :return: The text_search of this EntityDataPageLink. # noqa: E501 + :rtype: str + """ + return self._text_search + + @text_search.setter + def text_search(self, text_search): + """Sets the text_search of this EntityDataPageLink. + + + :param text_search: The text_search of this EntityDataPageLink. # noqa: E501 + :type: str + """ + if text_search is None: + raise ValueError("Invalid value for `text_search`, must not be `None`") # noqa: E501 + + self._text_search = text_search + + @property + def sort_order(self): + """Gets the sort_order of this EntityDataPageLink. # noqa: E501 + + + :return: The sort_order of this EntityDataPageLink. # noqa: E501 + :rtype: EntityDataSortOrder + """ + return self._sort_order + + @sort_order.setter + def sort_order(self, sort_order): + """Sets the sort_order of this EntityDataPageLink. + + + :param sort_order: The sort_order of this EntityDataPageLink. # noqa: E501 + :type: EntityDataSortOrder + """ + if sort_order is None: + raise ValueError("Invalid value for `sort_order`, must not be `None`") # noqa: E501 + + self._sort_order = sort_order + + @property + def dynamic(self): + """Gets the dynamic of this EntityDataPageLink. # noqa: E501 + + + :return: The dynamic of this EntityDataPageLink. # noqa: E501 + :rtype: bool + """ + return self._dynamic + + @dynamic.setter + def dynamic(self, dynamic): + """Sets the dynamic of this EntityDataPageLink. + + + :param dynamic: The dynamic of this EntityDataPageLink. # noqa: E501 + :type: bool + """ + if dynamic is None: + raise ValueError("Invalid value for `dynamic`, must not be `None`") # noqa: E501 + + self._dynamic = dynamic + + 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(EntityDataPageLink, 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, EntityDataPageLink): + 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_data_query.py b/tb_rest_client/models/models_ce/entity_data_query.py new file mode 100644 index 00000000..488306ef --- /dev/null +++ b/tb_rest_client/models/models_ce/entity_data_query.py @@ -0,0 +1,214 @@ +# 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 EntityDataQuery(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 = { + 'entity_fields': 'list[EntityKey]', + 'entity_filter': 'EntityFilter', + 'key_filters': 'list[KeyFilter]', + 'latest_values': 'list[EntityKey]', + 'page_link': 'EntityDataPageLink' + } + + attribute_map = { + 'entity_fields': 'entityFields', + 'entity_filter': 'entityFilter', + 'key_filters': 'keyFilters', + 'latest_values': 'latestValues', + 'page_link': 'pageLink' + } + + def __init__(self, entity_fields=None, entity_filter=None, key_filters=None, latest_values=None, page_link=None): # noqa: E501 + """EntityDataQuery - a model defined in Swagger""" # noqa: E501 + self._entity_fields = None + self._entity_filter = None + self._key_filters = None + self._latest_values = None + self._page_link = None + self.discriminator = None + if entity_fields is not None: + self.entity_fields = entity_fields + if entity_filter is not None: + self.entity_filter = entity_filter + if key_filters is not None: + self.key_filters = key_filters + if latest_values is not None: + self.latest_values = latest_values + if page_link is not None: + self.page_link = page_link + + @property + def entity_fields(self): + """Gets the entity_fields of this EntityDataQuery. # noqa: E501 + + + :return: The entity_fields of this EntityDataQuery. # noqa: E501 + :rtype: list[EntityKey] + """ + return self._entity_fields + + @entity_fields.setter + def entity_fields(self, entity_fields): + """Sets the entity_fields of this EntityDataQuery. + + + :param entity_fields: The entity_fields of this EntityDataQuery. # noqa: E501 + :type: list[EntityKey] + """ + + self._entity_fields = entity_fields + + @property + def entity_filter(self): + """Gets the entity_filter of this EntityDataQuery. # noqa: E501 + + + :return: The entity_filter of this EntityDataQuery. # noqa: E501 + :rtype: EntityFilter + """ + return self._entity_filter + + @entity_filter.setter + def entity_filter(self, entity_filter): + """Sets the entity_filter of this EntityDataQuery. + + + :param entity_filter: The entity_filter of this EntityDataQuery. # noqa: E501 + :type: EntityFilter + """ + + self._entity_filter = entity_filter + + @property + def key_filters(self): + """Gets the key_filters of this EntityDataQuery. # noqa: E501 + + + :return: The key_filters of this EntityDataQuery. # noqa: E501 + :rtype: list[KeyFilter] + """ + return self._key_filters + + @key_filters.setter + def key_filters(self, key_filters): + """Sets the key_filters of this EntityDataQuery. + + + :param key_filters: The key_filters of this EntityDataQuery. # noqa: E501 + :type: list[KeyFilter] + """ + + self._key_filters = key_filters + + @property + def latest_values(self): + """Gets the latest_values of this EntityDataQuery. # noqa: E501 + + + :return: The latest_values of this EntityDataQuery. # noqa: E501 + :rtype: list[EntityKey] + """ + return self._latest_values + + @latest_values.setter + def latest_values(self, latest_values): + """Sets the latest_values of this EntityDataQuery. + + + :param latest_values: The latest_values of this EntityDataQuery. # noqa: E501 + :type: list[EntityKey] + """ + + self._latest_values = latest_values + + @property + def page_link(self): + """Gets the page_link of this EntityDataQuery. # noqa: E501 + + + :return: The page_link of this EntityDataQuery. # noqa: E501 + :rtype: EntityDataPageLink + """ + return self._page_link + + @page_link.setter + def page_link(self, page_link): + """Sets the page_link of this EntityDataQuery. + + + :param page_link: The page_link of this EntityDataQuery. # noqa: E501 + :type: EntityDataPageLink + """ + + self._page_link = page_link + + 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(EntityDataQuery, 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, EntityDataQuery): + 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_data_sort_order.py b/tb_rest_client/models/models_ce/entity_data_sort_order.py new file mode 100644 index 00000000..94f35eb4 --- /dev/null +++ b/tb_rest_client/models/models_ce/entity_data_sort_order.py @@ -0,0 +1,142 @@ +# 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 EntityDataSortOrder(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 = { + 'direction': 'str', + 'key': 'EntityKey' + } + + attribute_map = { + 'direction': 'direction', + 'key': 'key' + } + + def __init__(self, direction=None, key=None): # noqa: E501 + """EntityDataSortOrder - a model defined in Swagger""" # noqa: E501 + self._direction = None + self._key = None + self.discriminator = None + if direction is not None: + self.direction = direction + if key is not None: + self.key = key + + @property + def direction(self): + """Gets the direction of this EntityDataSortOrder. # noqa: E501 + + + :return: The direction of this EntityDataSortOrder. # noqa: E501 + :rtype: str + """ + return self._direction + + @direction.setter + def direction(self, direction): + """Sets the direction of this EntityDataSortOrder. + + + :param direction: The direction of this EntityDataSortOrder. # noqa: E501 + :type: str + """ + allowed_values = ["ASC", "DESC"] # noqa: E501 + if direction not in allowed_values: + raise ValueError( + "Invalid value for `direction` ({0}), must be one of {1}" # noqa: E501 + .format(direction, allowed_values) + ) + + self._direction = direction + + @property + def key(self): + """Gets the key of this EntityDataSortOrder. # noqa: E501 + + + :return: The key of this EntityDataSortOrder. # noqa: E501 + :rtype: EntityKey + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this EntityDataSortOrder. + + + :param key: The key of this EntityDataSortOrder. # noqa: E501 + :type: EntityKey + """ + + self._key = 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(EntityDataSortOrder, 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, EntityDataSortOrder): + 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_filter.py b/tb_rest_client/models/models_ce/entity_filter.py new file mode 100644 index 00000000..280d900e --- /dev/null +++ b/tb_rest_client/models/models_ce/entity_filter.py @@ -0,0 +1,84 @@ +# 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 EntityFilter(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 + """EntityFilter - 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(EntityFilter, 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, EntityFilter): + 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_id.py b/tb_rest_client/models/models_ce/entity_id.py index 76228fbb..0e77132b 100644 --- a/tb_rest_client/models/models_ce/entity_id.py +++ b/tb_rest_client/models/models_ce/entity_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntityId(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 @@ -43,11 +39,9 @@ class EntityId(object): def __init__(self, entity_type=None, id=None): # noqa: E501 """EntityId - a model defined in Swagger""" # noqa: E501 - self._entity_type = None self._id = None self.discriminator = None - if entity_type is not None: self.entity_type = entity_type if id is not None: @@ -71,25 +65,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntityId. # noqa: E501 :type: str """ - allowed_values = ["TENANT", - "CUSTOMER", - "USER", - "DASHBOARD", - "ASSET", - "DEVICE", - "ALARM", - "ENTITY_GROUP", - "CONVERTER", - "INTEGRATION", - "RULE_CHAIN", - "RULE_NODE", - "SCHEDULER_EVENT", - "BLOB_ENTITY", - "ENTITY_VIEW", - "WIDGETS_BUNDLE", - "WIDGET_TYPE", - "ROLE", - "GROUP_PERMISSION"] # noqa: E501 + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "RULE_CHAIN", "RULE_NODE", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 @@ -148,7 +124,7 @@ def to_dict(self): def to_str(self): """Returns the string representation of the model""" - return self._id # pprint.pformat(self.to_dict()) + return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" diff --git a/tb_rest_client/models/models_ce/entity_info.py b/tb_rest_client/models/models_ce/entity_info.py new file mode 100644 index 00000000..b4364333 --- /dev/null +++ b/tb_rest_client/models/models_ce/entity_info.py @@ -0,0 +1,136 @@ +# 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 EntityInfo(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' + } + + attribute_map = { + 'id': 'id', + 'name': 'name' + } + + def __init__(self, id=None, name=None): # noqa: E501 + """EntityInfo - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self.discriminator = None + if id is not None: + self.id = id + if name is not None: + self.name = name + + @property + def id(self): + """Gets the id of this EntityInfo. # noqa: E501 + + + :return: The id of this EntityInfo. # noqa: E501 + :rtype: EntityId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EntityInfo. + + + :param id: The id of this EntityInfo. # noqa: E501 + :type: EntityId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this EntityInfo. # noqa: E501 + + + :return: The name of this EntityInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this EntityInfo. + + + :param name: The name of this EntityInfo. # noqa: E501 + :type: str + """ + + self._name = 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(EntityInfo, 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, EntityInfo): + 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_key.py b/tb_rest_client/models/models_ce/entity_key.py new file mode 100644 index 00000000..68a1f064 --- /dev/null +++ b/tb_rest_client/models/models_ce/entity_key.py @@ -0,0 +1,144 @@ +# 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 EntityKey(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 = { + 'type': 'str', + 'key': 'str' + } + + attribute_map = { + 'type': 'type', + 'key': 'key' + } + + def __init__(self, type=None, key=None): # noqa: E501 + """EntityKey - a model defined in Swagger""" # noqa: E501 + self._type = None + self._key = None + self.discriminator = None + self.type = type + self.key = key + + @property + def type(self): + """Gets the type of this EntityKey. # noqa: E501 + + + :return: The type of this EntityKey. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this EntityKey. + + + :param type: The type of this EntityKey. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["ATTRIBUTE", "CLIENT_ATTRIBUTE", "SHARED_ATTRIBUTE", "SERVER_ATTRIBUTE", "TIME_SERIES", "ENTITY_FIELD", "ALARM_FIELD"] # 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 key(self): + """Gets the key of this EntityKey. # noqa: E501 + + + :return: The key of this EntityKey. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this EntityKey. + + + :param key: The key of this EntityKey. # noqa: E501 + :type: str + """ + if key is None: + raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 + + self._key = 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(EntityKey, 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, EntityKey): + 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_relation.py b/tb_rest_client/models/models_ce/entity_relation.py index 20a0dd83..87fd9f3f 100644 --- a/tb_rest_client/models/models_ce/entity_relation.py +++ b/tb_rest_client/models/models_ce/entity_relation.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntityRelation(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -49,14 +45,12 @@ class EntityRelation(object): def __init__(self, additional_info=None, _from=None, to=None, type=None, type_group=None): # noqa: E501 """EntityRelation - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self.__from = None self._to = None self._type = None self._type_group = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if _from is not None: @@ -170,7 +164,7 @@ def type_group(self, type_group): :param type_group: The type_group of this EntityRelation. # noqa: E501 :type: str """ - allowed_values = ["COMMON", "ALARM", "DASHBOARD", "RULE_CHAIN", "RULE_NODE"] # noqa: E501 + allowed_values = ["COMMON", "ALARM", "DASHBOARD", "RULE_CHAIN", "RULE_NODE", "EDGE", "EDGE_AUTO_ASSIGN_RULE_CHAIN"] # noqa: E501 if type_group not in allowed_values: raise ValueError( "Invalid value for `type_group` ({0}), must be one of {1}" # noqa: E501 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 865ab72f..ad9a8e85 100644 --- a/tb_rest_client/models/models_ce/entity_relation_info.py +++ b/tb_rest_client/models/models_ce/entity_relation_info.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntityRelationInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -53,7 +49,6 @@ class EntityRelationInfo(object): def __init__(self, additional_info=None, _from=None, from_name=None, to=None, to_name=None, type=None, type_group=None): # noqa: E501 """EntityRelationInfo - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self.__from = None self._from_name = None @@ -62,7 +57,6 @@ def __init__(self, additional_info=None, _from=None, from_name=None, to=None, to self._type = None self._type_group = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if _from is not None: @@ -222,7 +216,7 @@ def type_group(self, type_group): :param type_group: The type_group of this EntityRelationInfo. # noqa: E501 :type: str """ - allowed_values = ["COMMON", "ALARM", "DASHBOARD", "RULE_CHAIN", "RULE_NODE"] # noqa: E501 + allowed_values = ["COMMON", "ALARM", "DASHBOARD", "RULE_CHAIN", "RULE_NODE", "EDGE", "EDGE_AUTO_ASSIGN_RULE_CHAIN"] # noqa: E501 if type_group not in allowed_values: raise ValueError( "Invalid value for `type_group` ({0}), must be one of {1}" # noqa: E501 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 262e2233..162a260e 100644 --- a/tb_rest_client/models/models_ce/entity_relations_query.py +++ b/tb_rest_client/models/models_ce/entity_relations_query.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntityRelationsQuery(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -32,7 +28,7 @@ class EntityRelationsQuery(object): and the value is json key in definition. """ swagger_types = { - 'filters': 'list[EntityTypeFilter]', + 'filters': 'list[RelationEntityTypeFilter]', 'parameters': 'RelationsSearchParameters' } @@ -43,11 +39,9 @@ class EntityRelationsQuery(object): def __init__(self, filters=None, parameters=None): # noqa: E501 """EntityRelationsQuery - a model defined in Swagger""" # noqa: E501 - self._filters = None self._parameters = None self.discriminator = None - if filters is not None: self.filters = filters if parameters is not None: @@ -59,7 +53,7 @@ def filters(self): :return: The filters of this EntityRelationsQuery. # noqa: E501 - :rtype: list[EntityTypeFilter] + :rtype: list[RelationEntityTypeFilter] """ return self._filters @@ -69,7 +63,7 @@ def filters(self, filters): :param filters: The filters of this EntityRelationsQuery. # noqa: E501 - :type: list[EntityTypeFilter] + :type: list[RelationEntityTypeFilter] """ self._filters = filters diff --git a/tb_rest_client/models/models_ce/entity_subtype.py b/tb_rest_client/models/models_ce/entity_subtype.py index 9fb5da1c..cb64e540 100644 --- a/tb_rest_client/models/models_ce/entity_subtype.py +++ b/tb_rest_client/models/models_ce/entity_subtype.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntitySubtype(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 @@ -45,12 +41,10 @@ class EntitySubtype(object): def __init__(self, entity_type=None, tenant_id=None, type=None): # noqa: E501 """EntitySubtype - a model defined in Swagger""" # noqa: E501 - self._entity_type = None self._tenant_id = None self._type = None self.discriminator = None - if entity_type is not None: self.entity_type = entity_type if tenant_id is not None: @@ -76,7 +70,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntitySubtype. # noqa: E501 :type: str """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "RULE_CHAIN", "RULE_NODE", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "RULE_CHAIN", "RULE_NODE", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # 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_view.py b/tb_rest_client/models/models_ce/entity_view.py index 7d57693e..193400d5 100644 --- a/tb_rest_client/models/models_ce/entity_view.py +++ b/tb_rest_client/models/models_ce/entity_view.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntityView(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 @@ -61,7 +57,6 @@ class EntityView(object): def __init__(self, additional_info=None, created_time=None, customer_id=None, end_time_ms=None, entity_id=None, id=None, keys=None, name=None, start_time_ms=None, tenant_id=None, type=None): # noqa: E501 """EntityView - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._created_time = None self._customer_id = None @@ -74,7 +69,6 @@ def __init__(self, additional_info=None, created_time=None, customer_id=None, en self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if created_time is not None: 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 ea08586a..a27f6ade 100644 --- a/tb_rest_client/models/models_ce/entity_view_id.py +++ b/tb_rest_client/models/models_ce/entity_view_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntityViewId(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 @@ -42,12 +38,10 @@ class EntityViewId(object): } def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - + """EntityViewId - a model defined in Swagger""" # noqa: E501 self._entity_type = None self._id = None self.discriminator = None - if entity_type is not None: self.entity_type = entity_type if id is not None: @@ -55,23 +49,23 @@ def __init__(self, entity_type=None, id=None): # noqa: E501 @property def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 + """Gets the entity_type of this EntityViewId. # noqa: E501 - :return: The entity_type of this EntityId. # noqa: E501 + :return: The entity_type of this EntityViewId. # noqa: E501 :rtype: str """ return self._entity_type @entity_type.setter def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. + """Sets the entity_type of this EntityViewId. - :param entity_type: The entity_type of this EntityId. # noqa: E501 + :param entity_type: The entity_type of this EntityViewId. # noqa: E501 :type: str """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # noqa: E501 + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "RULE_CHAIN", "RULE_NODE", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 @@ -82,20 +76,20 @@ def entity_type(self, entity_type): @property def id(self): - """Gets the id of this EntityId. # noqa: E501 + """Gets the id of this EntityViewId. # noqa: E501 - :return: The id of this EntityId. # noqa: E501 + :return: The id of this EntityViewId. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this EntityId. + """Sets the id of this EntityViewId. - :param id: The id of this EntityId. # noqa: E501 + :param id: The id of this EntityViewId. # noqa: E501 :type: str """ @@ -122,7 +116,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(self.__class__, dict): + if issubclass(EntityViewId, dict): for key, value in self.items(): result[key] = value @@ -138,7 +132,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): + if not isinstance(other, EntityViewId): return False return self.__dict__ == other.__dict__ diff --git a/tb_rest_client/models/models_ce/entity_view_info.py b/tb_rest_client/models/models_ce/entity_view_info.py new file mode 100644 index 00000000..2c4af50e --- /dev/null +++ b/tb_rest_client/models/models_ce/entity_view_info.py @@ -0,0 +1,422 @@ +# 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 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 = { + 'additional_info': 'str', + 'created_time': 'int', + 'customer_id': 'CustomerId', + 'customer_is_public': 'bool', + 'customer_title': 'str', + 'end_time_ms': 'int', + 'entity_id': 'EntityId', + 'id': 'EntityViewId', + 'keys': 'TelemetryEntityView', + 'name': 'str', + 'start_time_ms': 'int', + 'tenant_id': 'TenantId', + 'type': 'str' + } + + attribute_map = { + 'additional_info': 'additionalInfo', + 'created_time': 'createdTime', + 'customer_id': 'customerId', + 'customer_is_public': 'customerIsPublic', + 'customer_title': 'customerTitle', + 'end_time_ms': 'endTimeMs', + 'entity_id': 'entityId', + 'id': 'id', + 'keys': 'keys', + 'name': 'name', + 'start_time_ms': 'startTimeMs', + 'tenant_id': 'tenantId', + 'type': 'type' + } + + def __init__(self, additional_info=None, created_time=None, customer_id=None, customer_is_public=None, customer_title=None, end_time_ms=None, entity_id=None, id=None, keys=None, name=None, start_time_ms=None, tenant_id=None, type=None): # noqa: E501 + """EntityViewInfo - a model defined in Swagger""" # noqa: E501 + self._additional_info = None + self._created_time = None + self._customer_id = None + self._customer_is_public = None + self._customer_title = None + self._end_time_ms = None + self._entity_id = None + self._id = None + self._keys = None + self._name = None + self._start_time_ms = None + self._tenant_id = None + self._type = None + self.discriminator = None + if additional_info is not None: + self.additional_info = additional_info + if created_time is not None: + self.created_time = created_time + if customer_id is not None: + self.customer_id = customer_id + if customer_is_public is not None: + self.customer_is_public = customer_is_public + if customer_title is not None: + self.customer_title = customer_title + if end_time_ms is not None: + self.end_time_ms = end_time_ms + if entity_id is not None: + self.entity_id = entity_id + if id is not None: + self.id = id + if keys is not None: + self.keys = keys + if name is not None: + self.name = name + if start_time_ms is not None: + self.start_time_ms = start_time_ms + if tenant_id is not None: + self.tenant_id = tenant_id + if type is not None: + self.type = type + + @property + def additional_info(self): + """Gets the additional_info of this EntityViewInfo. # noqa: E501 + + + :return: The additional_info of this EntityViewInfo. # noqa: E501 + :rtype: str + """ + 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: str + """ + + self._additional_info = additional_info + + @property + def created_time(self): + """Gets the created_time of this EntityViewInfo. # 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. + + + :param created_time: The created_time of this EntityViewInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @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 customer_is_public(self): + """Gets the customer_is_public of this EntityViewInfo. # noqa: E501 + + + :return: The customer_is_public of this EntityViewInfo. # noqa: E501 + :rtype: bool + """ + return self._customer_is_public + + @customer_is_public.setter + def customer_is_public(self, customer_is_public): + """Sets the customer_is_public of this EntityViewInfo. + + + :param customer_is_public: The customer_is_public of this EntityViewInfo. # noqa: E501 + :type: bool + """ + + self._customer_is_public = customer_is_public + + @property + def customer_title(self): + """Gets the customer_title of this EntityViewInfo. # noqa: E501 + + + :return: The customer_title of this EntityViewInfo. # noqa: E501 + :rtype: str + """ + return self._customer_title + + @customer_title.setter + def customer_title(self, customer_title): + """Sets the customer_title of this EntityViewInfo. + + + :param customer_title: The customer_title of this EntityViewInfo. # noqa: E501 + :type: str + """ + + self._customer_title = customer_title + + @property + def end_time_ms(self): + """Gets the end_time_ms of this EntityViewInfo. # 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. + + + :param end_time_ms: The end_time_ms of this EntityViewInfo. # noqa: E501 + :type: int + """ + + self._end_time_ms = end_time_ms + + @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 + """ + + self._entity_id = entity_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 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 + """ + + self._keys = keys + + @property + def name(self): + """Gets the name of this EntityViewInfo. # 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. + + + :param name: The name of this EntityViewInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def start_time_ms(self): + """Gets the start_time_ms of this EntityViewInfo. # 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. + + + :param start_time_ms: The start_time_ms of this EntityViewInfo. # noqa: E501 + :type: int + """ + + self._start_time_ms = start_time_ms + + @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 type(self): + """Gets the type of this EntityViewInfo. # 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. + + + :param type: The type of this EntityViewInfo. # noqa: E501 + :type: str + """ + + 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(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_ce/entity_view_search_query.py b/tb_rest_client/models/models_ce/entity_view_search_query.py index ea8d7866..3c89fb75 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntityViewSearchQuery(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 @@ -45,12 +41,10 @@ class EntityViewSearchQuery(object): def __init__(self, entity_view_types=None, parameters=None, relation_type=None): # noqa: E501 """EntityViewSearchQuery - a model defined in Swagger""" # noqa: E501 - self._entity_view_types = None self._parameters = None self._relation_type = None self.discriminator = None - if entity_view_types is not None: self.entity_view_types = entity_view_types if parameters is not None: diff --git a/tb_rest_client/models/models_ce/event.py b/tb_rest_client/models/models_ce/event.py index 49fdc1c2..9dbd9244 100644 --- a/tb_rest_client/models/models_ce/event.py +++ b/tb_rest_client/models/models_ce/event.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Event(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 @@ -53,7 +49,6 @@ class Event(object): def __init__(self, body=None, created_time=None, entity_id=None, id=None, tenant_id=None, type=None, uid=None): # noqa: E501 """Event - a model defined in Swagger""" # noqa: E501 - self._body = None self._created_time = None self._entity_id = None @@ -62,7 +57,6 @@ def __init__(self, body=None, created_time=None, entity_id=None, id=None, tenant self._type = None self._uid = None self.discriminator = None - if body is not None: self.body = body if created_time is not None: diff --git a/tb_rest_client/models/models_ce/event_filter.py b/tb_rest_client/models/models_ce/event_filter.py new file mode 100644 index 00000000..cd8518bd --- /dev/null +++ b/tb_rest_client/models/models_ce/event_filter.py @@ -0,0 +1,84 @@ +# 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 EventFilter(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 + """EventFilter - 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(EventFilter, 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, EventFilter): + 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_id.py b/tb_rest_client/models/models_ce/event_id.py index 8914a8d9..3c89a2b9 100644 --- a/tb_rest_client/models/models_ce/event_id.py +++ b/tb_rest_client/models/models_ce/event_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EventId(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 @@ -41,10 +37,8 @@ class EventId(object): def __init__(self, id=None): # noqa: E501 """EventId - a model defined in Swagger""" # noqa: E501 - self._id = None self.discriminator = None - if id is not None: self.id = id diff --git a/tb_rest_client/models/models_ce/file.py b/tb_rest_client/models/models_ce/file.py index fc3c0bad..54e5a635 100644 --- a/tb_rest_client/models/models_ce/file.py +++ b/tb_rest_client/models/models_ce/file.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class File(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 @@ -66,12 +63,8 @@ class File(object): 'usable_space': 'usableSpace' } - def __init__(self, absolute=None, absolute_file=None, absolute_path=None, canonical_file=None, canonical_path=None, directory=None, file=None, free_space=None, hidden=None, name=None, parent=None, parent_file=None, path=None, total_space=None, usable_space=None, _configuration=None): # noqa: E501 + def __init__(self, absolute=None, absolute_file=None, absolute_path=None, canonical_file=None, canonical_path=None, directory=None, file=None, free_space=None, hidden=None, name=None, parent=None, parent_file=None, path=None, total_space=None, usable_space=None): # noqa: E501 """File - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._absolute = None self._absolute_file = None self._absolute_path = None @@ -88,7 +81,6 @@ def __init__(self, absolute=None, absolute_file=None, absolute_path=None, canoni self._total_space = None self._usable_space = None self.discriminator = None - if absolute is not None: self.absolute = absolute if absolute_file is not None: @@ -475,11 +467,8 @@ def __eq__(self, other): if not isinstance(other, File): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, File): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other diff --git a/tb_rest_client/models/models_ce/home_dashboard.py b/tb_rest_client/models/models_ce/home_dashboard.py new file mode 100644 index 00000000..cb4d3d05 --- /dev/null +++ b/tb_rest_client/models/models_ce/home_dashboard.py @@ -0,0 +1,370 @@ +# 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 HomeDashboard(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 = { + 'assigned_customers': 'list[ShortCustomerInfo]', + 'configuration': 'str', + 'created_time': 'int', + 'hide_dashboard_toolbar': 'bool', + 'id': 'DashboardId', + 'image': 'str', + 'mobile_hide': 'bool', + 'mobile_order': 'int', + 'name': 'str', + 'tenant_id': 'TenantId', + 'title': 'str' + } + + attribute_map = { + 'assigned_customers': 'assignedCustomers', + 'configuration': 'configuration', + 'created_time': 'createdTime', + 'hide_dashboard_toolbar': 'hideDashboardToolbar', + 'id': 'id', + 'image': 'image', + 'mobile_hide': 'mobileHide', + 'mobile_order': 'mobileOrder', + 'name': 'name', + 'tenant_id': 'tenantId', + 'title': 'title' + } + + def __init__(self, assigned_customers=None, configuration=None, created_time=None, hide_dashboard_toolbar=None, id=None, image=None, mobile_hide=None, mobile_order=None, name=None, tenant_id=None, title=None): # noqa: E501 + """HomeDashboard - a model defined in Swagger""" # noqa: E501 + self._assigned_customers = None + self._configuration = None + self._created_time = None + self._hide_dashboard_toolbar = None + self._id = None + self._image = None + self._mobile_hide = None + self._mobile_order = None + self._name = None + self._tenant_id = None + self._title = None + self.discriminator = None + if assigned_customers is not None: + self.assigned_customers = assigned_customers + if configuration is not None: + self.configuration = configuration + if created_time is not None: + self.created_time = created_time + if hide_dashboard_toolbar is not None: + self.hide_dashboard_toolbar = hide_dashboard_toolbar + if id is not None: + self.id = id + if image is not None: + self.image = image + if mobile_hide is not None: + self.mobile_hide = mobile_hide + if mobile_order is not None: + self.mobile_order = mobile_order + if name is not None: + self.name = name + if tenant_id is not None: + self.tenant_id = tenant_id + if title is not None: + self.title = title + + @property + def assigned_customers(self): + """Gets the assigned_customers of this HomeDashboard. # noqa: E501 + + + :return: The assigned_customers of this HomeDashboard. # noqa: E501 + :rtype: list[ShortCustomerInfo] + """ + return self._assigned_customers + + @assigned_customers.setter + def assigned_customers(self, assigned_customers): + """Sets the assigned_customers of this HomeDashboard. + + + :param assigned_customers: The assigned_customers of this HomeDashboard. # noqa: E501 + :type: list[ShortCustomerInfo] + """ + + self._assigned_customers = assigned_customers + + @property + def configuration(self): + """Gets the configuration of this HomeDashboard. # noqa: E501 + + + :return: The configuration of this HomeDashboard. # noqa: E501 + :rtype: str + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """Sets the configuration of this HomeDashboard. + + + :param configuration: The configuration of this HomeDashboard. # noqa: E501 + :type: str + """ + + self._configuration = configuration + + @property + def created_time(self): + """Gets the created_time of this HomeDashboard. # noqa: E501 + + + :return: The created_time of this HomeDashboard. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this HomeDashboard. + + + :param created_time: The created_time of this HomeDashboard. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def hide_dashboard_toolbar(self): + """Gets the hide_dashboard_toolbar of this HomeDashboard. # noqa: E501 + + + :return: The hide_dashboard_toolbar of this HomeDashboard. # 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 HomeDashboard. + + + :param hide_dashboard_toolbar: The hide_dashboard_toolbar of this HomeDashboard. # noqa: E501 + :type: bool + """ + + self._hide_dashboard_toolbar = hide_dashboard_toolbar + + @property + def id(self): + """Gets the id of this HomeDashboard. # noqa: E501 + + + :return: The id of this HomeDashboard. # noqa: E501 + :rtype: DashboardId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this HomeDashboard. + + + :param id: The id of this HomeDashboard. # noqa: E501 + :type: DashboardId + """ + + self._id = id + + @property + def image(self): + """Gets the image of this HomeDashboard. # noqa: E501 + + + :return: The image of this HomeDashboard. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this HomeDashboard. + + + :param image: The image of this HomeDashboard. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def mobile_hide(self): + """Gets the mobile_hide of this HomeDashboard. # noqa: E501 + + + :return: The mobile_hide of this HomeDashboard. # noqa: E501 + :rtype: bool + """ + return self._mobile_hide + + @mobile_hide.setter + def mobile_hide(self, mobile_hide): + """Sets the mobile_hide of this HomeDashboard. + + + :param mobile_hide: The mobile_hide of this HomeDashboard. # noqa: E501 + :type: bool + """ + + self._mobile_hide = mobile_hide + + @property + def mobile_order(self): + """Gets the mobile_order of this HomeDashboard. # noqa: E501 + + + :return: The mobile_order of this HomeDashboard. # noqa: E501 + :rtype: int + """ + return self._mobile_order + + @mobile_order.setter + def mobile_order(self, mobile_order): + """Sets the mobile_order of this HomeDashboard. + + + :param mobile_order: The mobile_order of this HomeDashboard. # noqa: E501 + :type: int + """ + + self._mobile_order = mobile_order + + @property + def name(self): + """Gets the name of this HomeDashboard. # noqa: E501 + + + :return: The name of this HomeDashboard. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this HomeDashboard. + + + :param name: The name of this HomeDashboard. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def tenant_id(self): + """Gets the tenant_id of this HomeDashboard. # noqa: E501 + + + :return: The tenant_id of this HomeDashboard. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this HomeDashboard. + + + :param tenant_id: The tenant_id of this HomeDashboard. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def title(self): + """Gets the title of this HomeDashboard. # noqa: E501 + + + :return: The title of this HomeDashboard. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this HomeDashboard. + + + :param title: The title of this HomeDashboard. # noqa: E501 + :type: str + """ + + self._title = title + + 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(HomeDashboard, 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, HomeDashboard): + 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/home_dashboard_info.py b/tb_rest_client/models/models_ce/home_dashboard_info.py new file mode 100644 index 00000000..38fe7c5b --- /dev/null +++ b/tb_rest_client/models/models_ce/home_dashboard_info.py @@ -0,0 +1,136 @@ +# 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 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 + + + :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. + + + :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_ce/input_stream.py b/tb_rest_client/models/models_ce/input_stream.py new file mode 100644 index 00000000..1d2d78d4 --- /dev/null +++ b/tb_rest_client/models/models_ce/input_stream.py @@ -0,0 +1,84 @@ +# 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 InputStream(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 + """InputStream - 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(InputStream, 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, InputStream): + 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/key_filter.py b/tb_rest_client/models/models_ce/key_filter.py new file mode 100644 index 00000000..059d3445 --- /dev/null +++ b/tb_rest_client/models/models_ce/key_filter.py @@ -0,0 +1,168 @@ +# 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 KeyFilter(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 = { + 'key': 'EntityKey', + 'predicate': 'KeyFilterPredicate', + 'value_type': 'str' + } + + attribute_map = { + 'key': 'key', + 'predicate': 'predicate', + 'value_type': 'valueType' + } + + def __init__(self, key=None, predicate=None, value_type=None): # noqa: E501 + """KeyFilter - a model defined in Swagger""" # noqa: E501 + self._key = None + self._predicate = None + self._value_type = None + self.discriminator = None + if key is not None: + self.key = key + if predicate is not None: + self.predicate = predicate + if value_type is not None: + self.value_type = value_type + + @property + def key(self): + """Gets the key of this KeyFilter. # noqa: E501 + + + :return: The key of this KeyFilter. # noqa: E501 + :rtype: EntityKey + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this KeyFilter. + + + :param key: The key of this KeyFilter. # noqa: E501 + :type: EntityKey + """ + + self._key = key + + @property + def predicate(self): + """Gets the predicate of this KeyFilter. # noqa: E501 + + + :return: The predicate of this KeyFilter. # noqa: E501 + :rtype: KeyFilterPredicate + """ + return self._predicate + + @predicate.setter + def predicate(self, predicate): + """Sets the predicate of this KeyFilter. + + + :param predicate: The predicate of this KeyFilter. # noqa: E501 + :type: KeyFilterPredicate + """ + + self._predicate = predicate + + @property + def value_type(self): + """Gets the value_type of this KeyFilter. # noqa: E501 + + + :return: The value_type of this KeyFilter. # noqa: E501 + :rtype: str + """ + return self._value_type + + @value_type.setter + def value_type(self, value_type): + """Sets the value_type of this KeyFilter. + + + :param value_type: The value_type of this KeyFilter. # noqa: E501 + :type: str + """ + allowed_values = ["STRING", "NUMERIC", "BOOLEAN", "DATE_TIME"] # noqa: E501 + if value_type not in allowed_values: + raise ValueError( + "Invalid value for `value_type` ({0}), must be one of {1}" # noqa: E501 + .format(value_type, allowed_values) + ) + + self._value_type = value_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(KeyFilter, 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, KeyFilter): + 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/key_filter_predicate.py b/tb_rest_client/models/models_ce/key_filter_predicate.py new file mode 100644 index 00000000..2fa7687b --- /dev/null +++ b/tb_rest_client/models/models_ce/key_filter_predicate.py @@ -0,0 +1,84 @@ +# 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 KeyFilterPredicate(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 + """KeyFilterPredicate - 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(KeyFilterPredicate, 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, KeyFilterPredicate): + 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/lw_m2m_instance.py b/tb_rest_client/models/models_ce/lw_m2m_instance.py index 2bacd114..ae2551c7 100644 --- a/tb_rest_client/models/models_ce/lw_m2m_instance.py +++ b/tb_rest_client/models/models_ce/lw_m2m_instance.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class LwM2mInstance(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 @@ -40,16 +37,11 @@ class LwM2mInstance(object): 'resources': 'resources' } - def __init__(self, id=None, resources=None, _configuration=None): # noqa: E501 + def __init__(self, id=None, resources=None): # noqa: E501 """LwM2mInstance - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._id = None self._resources = None self.discriminator = None - if id is not None: self.id = id if resources is not None: @@ -137,11 +129,8 @@ def __eq__(self, other): if not isinstance(other, LwM2mInstance): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, LwM2mInstance): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 dc017288..994830d2 100644 --- a/tb_rest_client/models/models_ce/lw_m2m_object.py +++ b/tb_rest_client/models/models_ce/lw_m2m_object.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class LwM2mObject(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 @@ -48,12 +45,8 @@ class LwM2mObject(object): 'name': 'name' } - def __init__(self, id=None, instances=None, key_id=None, mandatory=None, multiple=None, name=None, _configuration=None): # noqa: E501 + def __init__(self, id=None, instances=None, key_id=None, mandatory=None, multiple=None, name=None): # noqa: E501 """LwM2mObject - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._id = None self._instances = None self._key_id = None @@ -61,7 +54,6 @@ def __init__(self, id=None, instances=None, key_id=None, mandatory=None, multipl self._multiple = None self._name = None self.discriminator = None - if id is not None: self.id = id if instances is not None: @@ -241,11 +233,8 @@ def __eq__(self, other): if not isinstance(other, LwM2mObject): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, LwM2mObject): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 247dcb77..0c6ff9bb 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 @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class LwM2mResourceObserve(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 @@ -48,12 +45,8 @@ class LwM2mResourceObserve(object): 'telemetry': 'telemetry' } - def __init__(self, attribute=None, id=None, key_name=None, name=None, observe=None, telemetry=None, _configuration=None): # noqa: E501 + def __init__(self, attribute=None, id=None, key_name=None, name=None, observe=None, telemetry=None): # noqa: E501 """LwM2mResourceObserve - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._attribute = None self._id = None self._key_name = None @@ -61,7 +54,6 @@ def __init__(self, attribute=None, id=None, key_name=None, name=None, observe=No self._observe = None self._telemetry = None self.discriminator = None - if attribute is not None: self.attribute = attribute if id is not None: @@ -241,11 +233,8 @@ def __eq__(self, other): if not isinstance(other, LwM2mResourceObserve): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, LwM2mResourceObserve): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other diff --git a/tb_rest_client/models/models_ce/mapstring_ts_value.py b/tb_rest_client/models/models_ce/mapstring_ts_value.py new file mode 100644 index 00000000..4cc159e3 --- /dev/null +++ b/tb_rest_client/models/models_ce/mapstring_ts_value.py @@ -0,0 +1,89 @@ +# 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 MapstringTsValue(dict): + """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 = { + } + 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 + self.discriminator = None + dict.__init__(self, *args, **kwargs) + + 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(MapstringTsValue, 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, MapstringTsValue): + 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/node_connection_info.py b/tb_rest_client/models/models_ce/node_connection_info.py index 93d18d7f..995334cb 100644 --- a/tb_rest_client/models/models_ce/node_connection_info.py +++ b/tb_rest_client/models/models_ce/node_connection_info.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 NodeConnectionInfo(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 @@ -45,12 +41,10 @@ class NodeConnectionInfo(object): def __init__(self, from_index=None, to_index=None, type=None): # noqa: E501 """NodeConnectionInfo - a model defined in Swagger""" # noqa: E501 - self._from_index = None self._to_index = None self._type = None self.discriminator = None - if from_index is not None: self.from_index = from_index if to_index is not None: 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 new file mode 100644 index 00000000..b07050b3 --- /dev/null +++ b/tb_rest_client/models/models_ce/o_auth2_basic_mapper_config.py @@ -0,0 +1,298 @@ +# 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 OAuth2BasicMapperConfig(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 = { + 'always_full_screen': 'bool', + 'customer_name_pattern': 'str', + 'default_dashboard_name': 'str', + 'email_attribute_key': 'str', + 'first_name_attribute_key': 'str', + 'last_name_attribute_key': 'str', + 'tenant_name_pattern': 'str', + 'tenant_name_strategy': 'str' + } + + attribute_map = { + 'always_full_screen': 'alwaysFullScreen', + 'customer_name_pattern': 'customerNamePattern', + 'default_dashboard_name': 'defaultDashboardName', + 'email_attribute_key': 'emailAttributeKey', + 'first_name_attribute_key': 'firstNameAttributeKey', + 'last_name_attribute_key': 'lastNameAttributeKey', + 'tenant_name_pattern': 'tenantNamePattern', + 'tenant_name_strategy': 'tenantNameStrategy' + } + + def __init__(self, always_full_screen=None, customer_name_pattern=None, default_dashboard_name=None, email_attribute_key=None, first_name_attribute_key=None, last_name_attribute_key=None, tenant_name_pattern=None, tenant_name_strategy=None): # noqa: E501 + """OAuth2BasicMapperConfig - a model defined in Swagger""" # noqa: E501 + self._always_full_screen = None + self._customer_name_pattern = None + self._default_dashboard_name = None + self._email_attribute_key = None + self._first_name_attribute_key = None + self._last_name_attribute_key = None + self._tenant_name_pattern = None + self._tenant_name_strategy = None + self.discriminator = None + if always_full_screen is not None: + self.always_full_screen = always_full_screen + if customer_name_pattern is not None: + self.customer_name_pattern = customer_name_pattern + if default_dashboard_name is not None: + self.default_dashboard_name = default_dashboard_name + if email_attribute_key is not None: + self.email_attribute_key = email_attribute_key + if first_name_attribute_key is not None: + self.first_name_attribute_key = first_name_attribute_key + if last_name_attribute_key is not None: + self.last_name_attribute_key = last_name_attribute_key + if tenant_name_pattern is not None: + self.tenant_name_pattern = tenant_name_pattern + if tenant_name_strategy is not None: + self.tenant_name_strategy = tenant_name_strategy + + @property + def always_full_screen(self): + """Gets the always_full_screen of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The always_full_screen of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: bool + """ + return self._always_full_screen + + @always_full_screen.setter + def always_full_screen(self, always_full_screen): + """Sets the always_full_screen of this OAuth2BasicMapperConfig. + + + :param always_full_screen: The always_full_screen of this OAuth2BasicMapperConfig. # noqa: E501 + :type: bool + """ + + self._always_full_screen = always_full_screen + + @property + def customer_name_pattern(self): + """Gets the customer_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The customer_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._customer_name_pattern + + @customer_name_pattern.setter + def customer_name_pattern(self, customer_name_pattern): + """Sets the customer_name_pattern of this OAuth2BasicMapperConfig. + + + :param customer_name_pattern: The customer_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._customer_name_pattern = customer_name_pattern + + @property + def default_dashboard_name(self): + """Gets the default_dashboard_name of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The default_dashboard_name of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._default_dashboard_name + + @default_dashboard_name.setter + def default_dashboard_name(self, default_dashboard_name): + """Sets the default_dashboard_name of this OAuth2BasicMapperConfig. + + + :param default_dashboard_name: The default_dashboard_name of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._default_dashboard_name = default_dashboard_name + + @property + def email_attribute_key(self): + """Gets the email_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The email_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._email_attribute_key + + @email_attribute_key.setter + def email_attribute_key(self, email_attribute_key): + """Sets the email_attribute_key of this OAuth2BasicMapperConfig. + + + :param email_attribute_key: The email_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._email_attribute_key = email_attribute_key + + @property + def first_name_attribute_key(self): + """Gets the first_name_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The first_name_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._first_name_attribute_key + + @first_name_attribute_key.setter + def first_name_attribute_key(self, first_name_attribute_key): + """Sets the first_name_attribute_key of this OAuth2BasicMapperConfig. + + + :param first_name_attribute_key: The first_name_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._first_name_attribute_key = first_name_attribute_key + + @property + def last_name_attribute_key(self): + """Gets the last_name_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The last_name_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._last_name_attribute_key + + @last_name_attribute_key.setter + def last_name_attribute_key(self, last_name_attribute_key): + """Sets the last_name_attribute_key of this OAuth2BasicMapperConfig. + + + :param last_name_attribute_key: The last_name_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._last_name_attribute_key = last_name_attribute_key + + @property + def tenant_name_pattern(self): + """Gets the tenant_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The tenant_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._tenant_name_pattern + + @tenant_name_pattern.setter + def tenant_name_pattern(self, tenant_name_pattern): + """Sets the tenant_name_pattern of this OAuth2BasicMapperConfig. + + + :param tenant_name_pattern: The tenant_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._tenant_name_pattern = tenant_name_pattern + + @property + def tenant_name_strategy(self): + """Gets the tenant_name_strategy of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The tenant_name_strategy of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._tenant_name_strategy + + @tenant_name_strategy.setter + def tenant_name_strategy(self, tenant_name_strategy): + """Sets the tenant_name_strategy of this OAuth2BasicMapperConfig. + + + :param tenant_name_strategy: The tenant_name_strategy of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + allowed_values = ["DOMAIN", "EMAIL", "CUSTOM"] # noqa: E501 + if tenant_name_strategy not in allowed_values: + raise ValueError( + "Invalid value for `tenant_name_strategy` ({0}), must be one of {1}" # noqa: E501 + .format(tenant_name_strategy, allowed_values) + ) + + self._tenant_name_strategy = tenant_name_strategy + + 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(OAuth2BasicMapperConfig, 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, OAuth2BasicMapperConfig): + 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/o_auth2_client_info.py b/tb_rest_client/models/models_ce/o_auth2_client_info.py index 157fb882..dd0d5393 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 OAuth2ClientInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -32,63 +28,30 @@ class OAuth2ClientInfo(object): and the value is json key in definition. """ swagger_types = { - 'created_time': 'int', 'icon': 'str', - 'id': 'OAuth2IntegrationId', 'name': 'str', 'url': 'str' } attribute_map = { - 'created_time': 'createdTime', 'icon': 'icon', - 'id': 'id', 'name': 'name', 'url': 'url' } - def __init__(self, created_time=None, icon=None, id=None, name=None, url=None): # noqa: E501 + def __init__(self, icon=None, name=None, url=None): # noqa: E501 """OAuth2ClientInfo - a model defined in Swagger""" # noqa: E501 - - self._created_time = None self._icon = None - self._id = None self._name = None self._url = None self.discriminator = None - - if created_time is not None: - self.created_time = created_time if icon is not None: self.icon = icon - if id is not None: - self.id = id if name is not None: self.name = name if url is not None: self.url = url - @property - def created_time(self): - """Gets the created_time of this OAuth2ClientInfo. # noqa: E501 - - - :return: The created_time of this OAuth2ClientInfo. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this OAuth2ClientInfo. - - - :param created_time: The created_time of this OAuth2ClientInfo. # noqa: E501 - :type: int - """ - - self._created_time = created_time - @property def icon(self): """Gets the icon of this OAuth2ClientInfo. # noqa: E501 @@ -110,27 +73,6 @@ def icon(self, icon): self._icon = icon - @property - def id(self): - """Gets the id of this OAuth2ClientInfo. # noqa: E501 - - - :return: The id of this OAuth2ClientInfo. # noqa: E501 - :rtype: OAuth2IntegrationId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this OAuth2ClientInfo. - - - :param id: The id of this OAuth2ClientInfo. # noqa: E501 - :type: OAuth2IntegrationId - """ - - self._id = id - @property def name(self): """Gets the name of this OAuth2ClientInfo. # noqa: E501 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 new file mode 100644 index 00000000..968d0579 --- /dev/null +++ b/tb_rest_client/models/models_ce/o_auth2_client_registration_template.py @@ -0,0 +1,526 @@ +# 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 OAuth2ClientRegistrationTemplate(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 = { + 'access_token_uri': 'str', + 'additional_info': 'str', + 'authorization_uri': 'str', + 'client_authentication_method': 'str', + 'comment': 'str', + 'created_time': 'int', + 'help_link': 'str', + 'id': 'OAuth2ClientRegistrationTemplateId', + 'jwk_set_uri': 'str', + 'login_button_icon': 'str', + 'login_button_label': 'str', + 'mapper_config': 'OAuth2MapperConfig', + 'name': 'str', + 'provider_id': 'str', + 'scope': 'list[str]', + 'user_info_uri': 'str', + 'user_name_attribute_name': 'str' + } + + attribute_map = { + 'access_token_uri': 'accessTokenUri', + 'additional_info': 'additionalInfo', + 'authorization_uri': 'authorizationUri', + 'client_authentication_method': 'clientAuthenticationMethod', + 'comment': 'comment', + 'created_time': 'createdTime', + 'help_link': 'helpLink', + 'id': 'id', + 'jwk_set_uri': 'jwkSetUri', + 'login_button_icon': 'loginButtonIcon', + 'login_button_label': 'loginButtonLabel', + 'mapper_config': 'mapperConfig', + 'name': 'name', + 'provider_id': 'providerId', + 'scope': 'scope', + 'user_info_uri': 'userInfoUri', + 'user_name_attribute_name': 'userNameAttributeName' + } + + def __init__(self, access_token_uri=None, additional_info=None, authorization_uri=None, client_authentication_method=None, comment=None, created_time=None, help_link=None, id=None, jwk_set_uri=None, login_button_icon=None, login_button_label=None, mapper_config=None, name=None, provider_id=None, scope=None, user_info_uri=None, user_name_attribute_name=None): # noqa: E501 + """OAuth2ClientRegistrationTemplate - a model defined in Swagger""" # noqa: E501 + self._access_token_uri = None + self._additional_info = None + self._authorization_uri = None + self._client_authentication_method = None + self._comment = None + self._created_time = None + self._help_link = None + self._id = None + self._jwk_set_uri = None + self._login_button_icon = None + self._login_button_label = None + self._mapper_config = None + self._name = None + self._provider_id = None + self._scope = None + self._user_info_uri = None + self._user_name_attribute_name = None + self.discriminator = None + if access_token_uri is not None: + self.access_token_uri = access_token_uri + if additional_info is not None: + self.additional_info = additional_info + if authorization_uri is not None: + self.authorization_uri = authorization_uri + if client_authentication_method is not None: + self.client_authentication_method = client_authentication_method + if comment is not None: + self.comment = comment + if created_time is not None: + self.created_time = created_time + if help_link is not None: + self.help_link = help_link + if id is not None: + self.id = id + if jwk_set_uri is not None: + self.jwk_set_uri = jwk_set_uri + if login_button_icon is not None: + self.login_button_icon = login_button_icon + if login_button_label is not None: + self.login_button_label = login_button_label + if mapper_config is not None: + self.mapper_config = mapper_config + if name is not None: + self.name = name + if provider_id is not None: + self.provider_id = provider_id + if scope is not None: + self.scope = scope + if user_info_uri is not None: + self.user_info_uri = user_info_uri + if user_name_attribute_name is not None: + self.user_name_attribute_name = user_name_attribute_name + + @property + def access_token_uri(self): + """Gets the access_token_uri of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The access_token_uri of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._access_token_uri + + @access_token_uri.setter + def access_token_uri(self, access_token_uri): + """Sets the access_token_uri of this OAuth2ClientRegistrationTemplate. + + + :param access_token_uri: The access_token_uri of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._access_token_uri = access_token_uri + + @property + def additional_info(self): + """Gets the additional_info of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The additional_info of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this OAuth2ClientRegistrationTemplate. + + + :param additional_info: The additional_info of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._additional_info = additional_info + + @property + def authorization_uri(self): + """Gets the authorization_uri of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The authorization_uri of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._authorization_uri + + @authorization_uri.setter + def authorization_uri(self, authorization_uri): + """Sets the authorization_uri of this OAuth2ClientRegistrationTemplate. + + + :param authorization_uri: The authorization_uri of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._authorization_uri = authorization_uri + + @property + def client_authentication_method(self): + """Gets the client_authentication_method of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The client_authentication_method of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._client_authentication_method + + @client_authentication_method.setter + def client_authentication_method(self, client_authentication_method): + """Sets the client_authentication_method of this OAuth2ClientRegistrationTemplate. + + + :param client_authentication_method: The client_authentication_method of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._client_authentication_method = client_authentication_method + + @property + def comment(self): + """Gets the comment of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The comment of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._comment + + @comment.setter + def comment(self, comment): + """Sets the comment of this OAuth2ClientRegistrationTemplate. + + + :param comment: The comment of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._comment = comment + + @property + def created_time(self): + """Gets the created_time of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The created_time of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this OAuth2ClientRegistrationTemplate. + + + :param created_time: The created_time of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def help_link(self): + """Gets the help_link of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The help_link of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._help_link + + @help_link.setter + def help_link(self, help_link): + """Sets the help_link of this OAuth2ClientRegistrationTemplate. + + + :param help_link: The help_link of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._help_link = help_link + + @property + def id(self): + """Gets the id of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The id of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: OAuth2ClientRegistrationTemplateId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OAuth2ClientRegistrationTemplate. + + + :param id: The id of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: OAuth2ClientRegistrationTemplateId + """ + + self._id = id + + @property + def jwk_set_uri(self): + """Gets the jwk_set_uri of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The jwk_set_uri of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._jwk_set_uri + + @jwk_set_uri.setter + def jwk_set_uri(self, jwk_set_uri): + """Sets the jwk_set_uri of this OAuth2ClientRegistrationTemplate. + + + :param jwk_set_uri: The jwk_set_uri of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._jwk_set_uri = jwk_set_uri + + @property + def login_button_icon(self): + """Gets the login_button_icon of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The login_button_icon of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._login_button_icon + + @login_button_icon.setter + def login_button_icon(self, login_button_icon): + """Sets the login_button_icon of this OAuth2ClientRegistrationTemplate. + + + :param login_button_icon: The login_button_icon of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._login_button_icon = login_button_icon + + @property + def login_button_label(self): + """Gets the login_button_label of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The login_button_label of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._login_button_label + + @login_button_label.setter + def login_button_label(self, login_button_label): + """Sets the login_button_label of this OAuth2ClientRegistrationTemplate. + + + :param login_button_label: The login_button_label of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._login_button_label = login_button_label + + @property + def mapper_config(self): + """Gets the mapper_config of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The mapper_config of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: OAuth2MapperConfig + """ + return self._mapper_config + + @mapper_config.setter + def mapper_config(self, mapper_config): + """Sets the mapper_config of this OAuth2ClientRegistrationTemplate. + + + :param mapper_config: The mapper_config of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: OAuth2MapperConfig + """ + + self._mapper_config = mapper_config + + @property + def name(self): + """Gets the name of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The name of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this OAuth2ClientRegistrationTemplate. + + + :param name: The name of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def provider_id(self): + """Gets the provider_id of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The provider_id of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._provider_id + + @provider_id.setter + def provider_id(self, provider_id): + """Sets the provider_id of this OAuth2ClientRegistrationTemplate. + + + :param provider_id: The provider_id of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._provider_id = provider_id + + @property + def scope(self): + """Gets the scope of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The scope of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: list[str] + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this OAuth2ClientRegistrationTemplate. + + + :param scope: The scope of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: list[str] + """ + + self._scope = scope + + @property + def user_info_uri(self): + """Gets the user_info_uri of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The user_info_uri of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._user_info_uri + + @user_info_uri.setter + def user_info_uri(self, user_info_uri): + """Sets the user_info_uri of this OAuth2ClientRegistrationTemplate. + + + :param user_info_uri: The user_info_uri of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._user_info_uri = user_info_uri + + @property + def user_name_attribute_name(self): + """Gets the user_name_attribute_name of this OAuth2ClientRegistrationTemplate. # noqa: E501 + + + :return: The user_name_attribute_name of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :rtype: str + """ + return self._user_name_attribute_name + + @user_name_attribute_name.setter + def user_name_attribute_name(self, user_name_attribute_name): + """Sets the user_name_attribute_name of this OAuth2ClientRegistrationTemplate. + + + :param user_name_attribute_name: The user_name_attribute_name of this OAuth2ClientRegistrationTemplate. # noqa: E501 + :type: str + """ + + self._user_name_attribute_name = user_name_attribute_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(OAuth2ClientRegistrationTemplate, 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, OAuth2ClientRegistrationTemplate): + 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/o_auth2_client_registration_template_id.py b/tb_rest_client/models/models_ce/o_auth2_client_registration_template_id.py new file mode 100644 index 00000000..c01de4d9 --- /dev/null +++ b/tb_rest_client/models/models_ce/o_auth2_client_registration_template_id.py @@ -0,0 +1,110 @@ +# 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 OAuth2ClientRegistrationTemplateId(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 + """OAuth2ClientRegistrationTemplateId - a model defined in Swagger""" # noqa: E501 + self._id = None + self.discriminator = None + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this OAuth2ClientRegistrationTemplateId. # noqa: E501 + + + :return: The id of this OAuth2ClientRegistrationTemplateId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OAuth2ClientRegistrationTemplateId. + + + :param id: The id of this OAuth2ClientRegistrationTemplateId. # noqa: E501 + :type: str + """ + + 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(OAuth2ClientRegistrationTemplateId, 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, OAuth2ClientRegistrationTemplateId): + 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/o_auth2_custom_mapper_config.py b/tb_rest_client/models/models_ce/o_auth2_custom_mapper_config.py new file mode 100644 index 00000000..5da4a6ab --- /dev/null +++ b/tb_rest_client/models/models_ce/o_auth2_custom_mapper_config.py @@ -0,0 +1,188 @@ +# 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 OAuth2CustomMapperConfig(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 = { + 'password': 'str', + 'send_token': 'bool', + 'url': 'str', + 'username': 'str' + } + + attribute_map = { + 'password': 'password', + 'send_token': 'sendToken', + 'url': 'url', + 'username': 'username' + } + + def __init__(self, password=None, send_token=None, url=None, username=None): # noqa: E501 + """OAuth2CustomMapperConfig - a model defined in Swagger""" # noqa: E501 + self._password = None + self._send_token = None + self._url = None + self._username = None + self.discriminator = None + if password is not None: + self.password = password + if send_token is not None: + self.send_token = send_token + if url is not None: + self.url = url + if username is not None: + self.username = username + + @property + def password(self): + """Gets the password of this OAuth2CustomMapperConfig. # noqa: E501 + + + :return: The password of this OAuth2CustomMapperConfig. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this OAuth2CustomMapperConfig. + + + :param password: The password of this OAuth2CustomMapperConfig. # noqa: E501 + :type: str + """ + + self._password = password + + @property + def send_token(self): + """Gets the send_token of this OAuth2CustomMapperConfig. # noqa: E501 + + + :return: The send_token of this OAuth2CustomMapperConfig. # noqa: E501 + :rtype: bool + """ + return self._send_token + + @send_token.setter + def send_token(self, send_token): + """Sets the send_token of this OAuth2CustomMapperConfig. + + + :param send_token: The send_token of this OAuth2CustomMapperConfig. # noqa: E501 + :type: bool + """ + + self._send_token = send_token + + @property + def url(self): + """Gets the url of this OAuth2CustomMapperConfig. # noqa: E501 + + + :return: The url of this OAuth2CustomMapperConfig. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this OAuth2CustomMapperConfig. + + + :param url: The url of this OAuth2CustomMapperConfig. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def username(self): + """Gets the username of this OAuth2CustomMapperConfig. # noqa: E501 + + + :return: The username of this OAuth2CustomMapperConfig. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this OAuth2CustomMapperConfig. + + + :param username: The username of this OAuth2CustomMapperConfig. # noqa: E501 + :type: str + """ + + self._username = username + + 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(OAuth2CustomMapperConfig, 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, OAuth2CustomMapperConfig): + 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/o_auth2_domain_info.py b/tb_rest_client/models/models_ce/o_auth2_domain_info.py new file mode 100644 index 00000000..2538c991 --- /dev/null +++ b/tb_rest_client/models/models_ce/o_auth2_domain_info.py @@ -0,0 +1,142 @@ +# 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 OAuth2DomainInfo(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 = { + 'name': 'str', + 'scheme': 'str' + } + + attribute_map = { + 'name': 'name', + 'scheme': 'scheme' + } + + def __init__(self, name=None, scheme=None): # noqa: E501 + """OAuth2DomainInfo - a model defined in Swagger""" # noqa: E501 + self._name = None + self._scheme = None + self.discriminator = None + if name is not None: + self.name = name + if scheme is not None: + self.scheme = scheme + + @property + def name(self): + """Gets the name of this OAuth2DomainInfo. # noqa: E501 + + + :return: The name of this OAuth2DomainInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this OAuth2DomainInfo. + + + :param name: The name of this OAuth2DomainInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def scheme(self): + """Gets the scheme of this OAuth2DomainInfo. # noqa: E501 + + + :return: The scheme of this OAuth2DomainInfo. # noqa: E501 + :rtype: str + """ + return self._scheme + + @scheme.setter + def scheme(self, scheme): + """Sets the scheme of this OAuth2DomainInfo. + + + :param scheme: The scheme of this OAuth2DomainInfo. # noqa: E501 + :type: str + """ + allowed_values = ["HTTP", "HTTPS", "MIXED"] # noqa: E501 + if scheme not in allowed_values: + raise ValueError( + "Invalid value for `scheme` ({0}), must be one of {1}" # noqa: E501 + .format(scheme, allowed_values) + ) + + self._scheme = scheme + + 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(OAuth2DomainInfo, 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, OAuth2DomainInfo): + 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/o_auth2_info.py b/tb_rest_client/models/models_ce/o_auth2_info.py new file mode 100644 index 00000000..88ca0ff7 --- /dev/null +++ b/tb_rest_client/models/models_ce/o_auth2_info.py @@ -0,0 +1,136 @@ +# 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 OAuth2Info(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 = { + 'enabled': 'bool', + 'oauth2_params_infos': 'list[OAuth2ParamsInfo]' + } + + attribute_map = { + 'enabled': 'enabled', + 'oauth2_params_infos': 'oauth2ParamsInfos' + } + + def __init__(self, enabled=None, oauth2_params_infos=None): # noqa: E501 + """OAuth2Info - a model defined in Swagger""" # noqa: E501 + self._enabled = None + self._oauth2_params_infos = None + self.discriminator = None + if enabled is not None: + self.enabled = enabled + if oauth2_params_infos is not None: + self.oauth2_params_infos = oauth2_params_infos + + @property + def enabled(self): + """Gets the enabled of this OAuth2Info. # noqa: E501 + + + :return: The enabled of this OAuth2Info. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this OAuth2Info. + + + :param enabled: The enabled of this OAuth2Info. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + @property + def oauth2_params_infos(self): + """Gets the oauth2_params_infos of this OAuth2Info. # noqa: E501 + + + :return: The oauth2_params_infos of this OAuth2Info. # noqa: E501 + :rtype: list[OAuth2ParamsInfo] + """ + return self._oauth2_params_infos + + @oauth2_params_infos.setter + def oauth2_params_infos(self, oauth2_params_infos): + """Sets the oauth2_params_infos of this OAuth2Info. + + + :param oauth2_params_infos: The oauth2_params_infos of this OAuth2Info. # noqa: E501 + :type: list[OAuth2ParamsInfo] + """ + + self._oauth2_params_infos = oauth2_params_infos + + 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(OAuth2Info, 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, OAuth2Info): + 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/o_auth2_mapper_config.py b/tb_rest_client/models/models_ce/o_auth2_mapper_config.py new file mode 100644 index 00000000..2ff32aac --- /dev/null +++ b/tb_rest_client/models/models_ce/o_auth2_mapper_config.py @@ -0,0 +1,220 @@ +# 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 OAuth2MapperConfig(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 = { + 'activate_user': 'bool', + 'allow_user_creation': 'bool', + 'basic': 'OAuth2BasicMapperConfig', + 'custom': 'OAuth2CustomMapperConfig', + 'type': 'str' + } + + attribute_map = { + 'activate_user': 'activateUser', + 'allow_user_creation': 'allowUserCreation', + 'basic': 'basic', + 'custom': 'custom', + 'type': 'type' + } + + def __init__(self, activate_user=None, allow_user_creation=None, basic=None, custom=None, type=None): # noqa: E501 + """OAuth2MapperConfig - a model defined in Swagger""" # noqa: E501 + self._activate_user = None + self._allow_user_creation = None + self._basic = None + self._custom = None + self._type = None + self.discriminator = None + if activate_user is not None: + self.activate_user = activate_user + if allow_user_creation is not None: + self.allow_user_creation = allow_user_creation + if basic is not None: + self.basic = basic + if custom is not None: + self.custom = custom + if type is not None: + self.type = type + + @property + def activate_user(self): + """Gets the activate_user of this OAuth2MapperConfig. # noqa: E501 + + + :return: The activate_user of this OAuth2MapperConfig. # noqa: E501 + :rtype: bool + """ + return self._activate_user + + @activate_user.setter + def activate_user(self, activate_user): + """Sets the activate_user of this OAuth2MapperConfig. + + + :param activate_user: The activate_user of this OAuth2MapperConfig. # noqa: E501 + :type: bool + """ + + self._activate_user = activate_user + + @property + def allow_user_creation(self): + """Gets the allow_user_creation of this OAuth2MapperConfig. # noqa: E501 + + + :return: The allow_user_creation of this OAuth2MapperConfig. # noqa: E501 + :rtype: bool + """ + return self._allow_user_creation + + @allow_user_creation.setter + def allow_user_creation(self, allow_user_creation): + """Sets the allow_user_creation of this OAuth2MapperConfig. + + + :param allow_user_creation: The allow_user_creation of this OAuth2MapperConfig. # noqa: E501 + :type: bool + """ + + self._allow_user_creation = allow_user_creation + + @property + def basic(self): + """Gets the basic of this OAuth2MapperConfig. # noqa: E501 + + + :return: The basic of this OAuth2MapperConfig. # noqa: E501 + :rtype: OAuth2BasicMapperConfig + """ + return self._basic + + @basic.setter + def basic(self, basic): + """Sets the basic of this OAuth2MapperConfig. + + + :param basic: The basic of this OAuth2MapperConfig. # noqa: E501 + :type: OAuth2BasicMapperConfig + """ + + self._basic = basic + + @property + def custom(self): + """Gets the custom of this OAuth2MapperConfig. # noqa: E501 + + + :return: The custom of this OAuth2MapperConfig. # noqa: E501 + :rtype: OAuth2CustomMapperConfig + """ + return self._custom + + @custom.setter + def custom(self, custom): + """Sets the custom of this OAuth2MapperConfig. + + + :param custom: The custom of this OAuth2MapperConfig. # noqa: E501 + :type: OAuth2CustomMapperConfig + """ + + self._custom = custom + + @property + def type(self): + """Gets the type of this OAuth2MapperConfig. # noqa: E501 + + + :return: The type of this OAuth2MapperConfig. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this OAuth2MapperConfig. + + + :param type: The type of this OAuth2MapperConfig. # noqa: E501 + :type: str + """ + allowed_values = ["BASIC", "CUSTOM", "GITHUB", "APPLE"] # 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(OAuth2MapperConfig, 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, OAuth2MapperConfig): + 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/o_auth2_mobile_info.py b/tb_rest_client/models/models_ce/o_auth2_mobile_info.py new file mode 100644 index 00000000..2e44fccb --- /dev/null +++ b/tb_rest_client/models/models_ce/o_auth2_mobile_info.py @@ -0,0 +1,136 @@ +# 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 OAuth2MobileInfo(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 = { + 'app_secret': 'str', + 'pkg_name': 'str' + } + + attribute_map = { + 'app_secret': 'appSecret', + 'pkg_name': 'pkgName' + } + + def __init__(self, app_secret=None, pkg_name=None): # noqa: E501 + """OAuth2MobileInfo - a model defined in Swagger""" # noqa: E501 + self._app_secret = None + self._pkg_name = None + self.discriminator = None + if app_secret is not None: + self.app_secret = app_secret + if pkg_name is not None: + self.pkg_name = pkg_name + + @property + def app_secret(self): + """Gets the app_secret of this OAuth2MobileInfo. # noqa: E501 + + + :return: The app_secret of this OAuth2MobileInfo. # noqa: E501 + :rtype: str + """ + return self._app_secret + + @app_secret.setter + def app_secret(self, app_secret): + """Sets the app_secret of this OAuth2MobileInfo. + + + :param app_secret: The app_secret of this OAuth2MobileInfo. # noqa: E501 + :type: str + """ + + self._app_secret = app_secret + + @property + def pkg_name(self): + """Gets the pkg_name of this OAuth2MobileInfo. # noqa: E501 + + + :return: The pkg_name of this OAuth2MobileInfo. # noqa: E501 + :rtype: str + """ + return self._pkg_name + + @pkg_name.setter + def pkg_name(self, pkg_name): + """Sets the pkg_name of this OAuth2MobileInfo. + + + :param pkg_name: The pkg_name of this OAuth2MobileInfo. # noqa: E501 + :type: str + """ + + self._pkg_name = pkg_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(OAuth2MobileInfo, 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, OAuth2MobileInfo): + 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/o_auth2_params_info.py b/tb_rest_client/models/models_ce/o_auth2_params_info.py new file mode 100644 index 00000000..4e24970f --- /dev/null +++ b/tb_rest_client/models/models_ce/o_auth2_params_info.py @@ -0,0 +1,162 @@ +# 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 OAuth2ParamsInfo(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 = { + 'client_registrations': 'list[OAuth2RegistrationInfo]', + 'domain_infos': 'list[OAuth2DomainInfo]', + 'mobile_infos': 'list[OAuth2MobileInfo]' + } + + attribute_map = { + 'client_registrations': 'clientRegistrations', + 'domain_infos': 'domainInfos', + 'mobile_infos': 'mobileInfos' + } + + def __init__(self, client_registrations=None, domain_infos=None, mobile_infos=None): # noqa: E501 + """OAuth2ParamsInfo - a model defined in Swagger""" # noqa: E501 + self._client_registrations = None + self._domain_infos = None + self._mobile_infos = None + self.discriminator = None + if client_registrations is not None: + self.client_registrations = client_registrations + if domain_infos is not None: + self.domain_infos = domain_infos + if mobile_infos is not None: + self.mobile_infos = mobile_infos + + @property + def client_registrations(self): + """Gets the client_registrations of this OAuth2ParamsInfo. # noqa: E501 + + + :return: The client_registrations of this OAuth2ParamsInfo. # noqa: E501 + :rtype: list[OAuth2RegistrationInfo] + """ + return self._client_registrations + + @client_registrations.setter + def client_registrations(self, client_registrations): + """Sets the client_registrations of this OAuth2ParamsInfo. + + + :param client_registrations: The client_registrations of this OAuth2ParamsInfo. # noqa: E501 + :type: list[OAuth2RegistrationInfo] + """ + + self._client_registrations = client_registrations + + @property + def domain_infos(self): + """Gets the domain_infos of this OAuth2ParamsInfo. # noqa: E501 + + + :return: The domain_infos of this OAuth2ParamsInfo. # noqa: E501 + :rtype: list[OAuth2DomainInfo] + """ + return self._domain_infos + + @domain_infos.setter + def domain_infos(self, domain_infos): + """Sets the domain_infos of this OAuth2ParamsInfo. + + + :param domain_infos: The domain_infos of this OAuth2ParamsInfo. # noqa: E501 + :type: list[OAuth2DomainInfo] + """ + + self._domain_infos = domain_infos + + @property + def mobile_infos(self): + """Gets the mobile_infos of this OAuth2ParamsInfo. # noqa: E501 + + + :return: The mobile_infos of this OAuth2ParamsInfo. # noqa: E501 + :rtype: list[OAuth2MobileInfo] + """ + return self._mobile_infos + + @mobile_infos.setter + def mobile_infos(self, mobile_infos): + """Sets the mobile_infos of this OAuth2ParamsInfo. + + + :param mobile_infos: The mobile_infos of this OAuth2ParamsInfo. # noqa: E501 + :type: list[OAuth2MobileInfo] + """ + + self._mobile_infos = mobile_infos + + 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(OAuth2ParamsInfo, 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, OAuth2ParamsInfo): + 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/o_auth2_registration_info.py b/tb_rest_client/models/models_ce/o_auth2_registration_info.py new file mode 100644 index 00000000..34c95809 --- /dev/null +++ b/tb_rest_client/models/models_ce/o_auth2_registration_info.py @@ -0,0 +1,455 @@ +# 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 OAuth2RegistrationInfo(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 = { + 'access_token_uri': 'str', + 'additional_info': 'str', + 'authorization_uri': 'str', + 'client_authentication_method': 'str', + 'client_id': 'str', + 'client_secret': 'str', + 'jwk_set_uri': 'str', + 'login_button_icon': 'str', + 'login_button_label': 'str', + 'mapper_config': 'OAuth2MapperConfig', + 'platforms': 'list[str]', + 'scope': 'list[str]', + 'user_info_uri': 'str', + 'user_name_attribute_name': 'str' + } + + attribute_map = { + 'access_token_uri': 'accessTokenUri', + 'additional_info': 'additionalInfo', + 'authorization_uri': 'authorizationUri', + 'client_authentication_method': 'clientAuthenticationMethod', + 'client_id': 'clientId', + 'client_secret': 'clientSecret', + 'jwk_set_uri': 'jwkSetUri', + 'login_button_icon': 'loginButtonIcon', + 'login_button_label': 'loginButtonLabel', + 'mapper_config': 'mapperConfig', + 'platforms': 'platforms', + 'scope': 'scope', + 'user_info_uri': 'userInfoUri', + 'user_name_attribute_name': 'userNameAttributeName' + } + + def __init__(self, access_token_uri=None, additional_info=None, authorization_uri=None, client_authentication_method=None, client_id=None, client_secret=None, jwk_set_uri=None, login_button_icon=None, login_button_label=None, mapper_config=None, platforms=None, scope=None, user_info_uri=None, user_name_attribute_name=None): # noqa: E501 + """OAuth2RegistrationInfo - a model defined in Swagger""" # noqa: E501 + self._access_token_uri = None + self._additional_info = None + self._authorization_uri = None + self._client_authentication_method = None + self._client_id = None + self._client_secret = None + self._jwk_set_uri = None + self._login_button_icon = None + self._login_button_label = None + self._mapper_config = None + self._platforms = None + self._scope = None + self._user_info_uri = None + self._user_name_attribute_name = None + self.discriminator = None + if access_token_uri is not None: + self.access_token_uri = access_token_uri + if additional_info is not None: + self.additional_info = additional_info + if authorization_uri is not None: + self.authorization_uri = authorization_uri + if client_authentication_method is not None: + self.client_authentication_method = client_authentication_method + if client_id is not None: + self.client_id = client_id + if client_secret is not None: + self.client_secret = client_secret + if jwk_set_uri is not None: + self.jwk_set_uri = jwk_set_uri + if login_button_icon is not None: + self.login_button_icon = login_button_icon + if login_button_label is not None: + self.login_button_label = login_button_label + if mapper_config is not None: + self.mapper_config = mapper_config + if platforms is not None: + self.platforms = platforms + if scope is not None: + self.scope = scope + if user_info_uri is not None: + self.user_info_uri = user_info_uri + if user_name_attribute_name is not None: + self.user_name_attribute_name = user_name_attribute_name + + @property + def access_token_uri(self): + """Gets the access_token_uri of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The access_token_uri of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: str + """ + return self._access_token_uri + + @access_token_uri.setter + def access_token_uri(self, access_token_uri): + """Sets the access_token_uri of this OAuth2RegistrationInfo. + + + :param access_token_uri: The access_token_uri of this OAuth2RegistrationInfo. # noqa: E501 + :type: str + """ + + self._access_token_uri = access_token_uri + + @property + def additional_info(self): + """Gets the additional_info of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The additional_info of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: str + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this OAuth2RegistrationInfo. + + + :param additional_info: The additional_info of this OAuth2RegistrationInfo. # noqa: E501 + :type: str + """ + + self._additional_info = additional_info + + @property + def authorization_uri(self): + """Gets the authorization_uri of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The authorization_uri of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: str + """ + return self._authorization_uri + + @authorization_uri.setter + def authorization_uri(self, authorization_uri): + """Sets the authorization_uri of this OAuth2RegistrationInfo. + + + :param authorization_uri: The authorization_uri of this OAuth2RegistrationInfo. # noqa: E501 + :type: str + """ + + self._authorization_uri = authorization_uri + + @property + def client_authentication_method(self): + """Gets the client_authentication_method of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The client_authentication_method of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: str + """ + return self._client_authentication_method + + @client_authentication_method.setter + def client_authentication_method(self, client_authentication_method): + """Sets the client_authentication_method of this OAuth2RegistrationInfo. + + + :param client_authentication_method: The client_authentication_method of this OAuth2RegistrationInfo. # noqa: E501 + :type: str + """ + + self._client_authentication_method = client_authentication_method + + @property + def client_id(self): + """Gets the client_id of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The client_id of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: str + """ + return self._client_id + + @client_id.setter + def client_id(self, client_id): + """Sets the client_id of this OAuth2RegistrationInfo. + + + :param client_id: The client_id of this OAuth2RegistrationInfo. # noqa: E501 + :type: str + """ + + self._client_id = client_id + + @property + def client_secret(self): + """Gets the client_secret of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The client_secret of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: str + """ + return self._client_secret + + @client_secret.setter + def client_secret(self, client_secret): + """Sets the client_secret of this OAuth2RegistrationInfo. + + + :param client_secret: The client_secret of this OAuth2RegistrationInfo. # noqa: E501 + :type: str + """ + + self._client_secret = client_secret + + @property + def jwk_set_uri(self): + """Gets the jwk_set_uri of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The jwk_set_uri of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: str + """ + return self._jwk_set_uri + + @jwk_set_uri.setter + def jwk_set_uri(self, jwk_set_uri): + """Sets the jwk_set_uri of this OAuth2RegistrationInfo. + + + :param jwk_set_uri: The jwk_set_uri of this OAuth2RegistrationInfo. # noqa: E501 + :type: str + """ + + self._jwk_set_uri = jwk_set_uri + + @property + def login_button_icon(self): + """Gets the login_button_icon of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The login_button_icon of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: str + """ + return self._login_button_icon + + @login_button_icon.setter + def login_button_icon(self, login_button_icon): + """Sets the login_button_icon of this OAuth2RegistrationInfo. + + + :param login_button_icon: The login_button_icon of this OAuth2RegistrationInfo. # noqa: E501 + :type: str + """ + + self._login_button_icon = login_button_icon + + @property + def login_button_label(self): + """Gets the login_button_label of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The login_button_label of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: str + """ + return self._login_button_label + + @login_button_label.setter + def login_button_label(self, login_button_label): + """Sets the login_button_label of this OAuth2RegistrationInfo. + + + :param login_button_label: The login_button_label of this OAuth2RegistrationInfo. # noqa: E501 + :type: str + """ + + self._login_button_label = login_button_label + + @property + def mapper_config(self): + """Gets the mapper_config of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The mapper_config of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: OAuth2MapperConfig + """ + return self._mapper_config + + @mapper_config.setter + def mapper_config(self, mapper_config): + """Sets the mapper_config of this OAuth2RegistrationInfo. + + + :param mapper_config: The mapper_config of this OAuth2RegistrationInfo. # noqa: E501 + :type: OAuth2MapperConfig + """ + + self._mapper_config = mapper_config + + @property + def platforms(self): + """Gets the platforms of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The platforms of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: list[str] + """ + return self._platforms + + @platforms.setter + def platforms(self, platforms): + """Sets the platforms of this OAuth2RegistrationInfo. + + + :param platforms: The platforms of this OAuth2RegistrationInfo. # noqa: E501 + :type: list[str] + """ + allowed_values = ["WEB", "ANDROID", "IOS"] # noqa: E501 + if not set(platforms).issubset(set(allowed_values)): + raise ValueError( + "Invalid values for `platforms` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(platforms) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._platforms = platforms + + @property + def scope(self): + """Gets the scope of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The scope of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: list[str] + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this OAuth2RegistrationInfo. + + + :param scope: The scope of this OAuth2RegistrationInfo. # noqa: E501 + :type: list[str] + """ + + self._scope = scope + + @property + def user_info_uri(self): + """Gets the user_info_uri of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The user_info_uri of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: str + """ + return self._user_info_uri + + @user_info_uri.setter + def user_info_uri(self, user_info_uri): + """Sets the user_info_uri of this OAuth2RegistrationInfo. + + + :param user_info_uri: The user_info_uri of this OAuth2RegistrationInfo. # noqa: E501 + :type: str + """ + + self._user_info_uri = user_info_uri + + @property + def user_name_attribute_name(self): + """Gets the user_name_attribute_name of this OAuth2RegistrationInfo. # noqa: E501 + + + :return: The user_name_attribute_name of this OAuth2RegistrationInfo. # noqa: E501 + :rtype: str + """ + return self._user_name_attribute_name + + @user_name_attribute_name.setter + def user_name_attribute_name(self, user_name_attribute_name): + """Sets the user_name_attribute_name of this OAuth2RegistrationInfo. + + + :param user_name_attribute_name: The user_name_attribute_name of this OAuth2RegistrationInfo. # noqa: E501 + :type: str + """ + + self._user_name_attribute_name = user_name_attribute_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(OAuth2RegistrationInfo, 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, OAuth2RegistrationInfo): + 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/object_node.py b/tb_rest_client/models/models_ce/object_node.py new file mode 100644 index 00000000..67c8b13d --- /dev/null +++ b/tb_rest_client/models/models_ce/object_node.py @@ -0,0 +1,84 @@ +# 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 ObjectNode(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 + """ObjectNode - 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(ObjectNode, 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, ObjectNode): + 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 5c3026b6..bb54f939 100644 --- a/tb_rest_client/models/models_ce/ota_package.py +++ b/tb_rest_client/models/models_ce/ota_package.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class OtaPackage(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 @@ -42,6 +39,7 @@ class OtaPackage(object): 'file_name': 'str', 'has_data': 'bool', 'id': 'OtaPackageId', + 'tag': 'str', 'tenant_id': 'TenantId', 'title': 'str', 'type': 'str', @@ -61,6 +59,7 @@ class OtaPackage(object): 'file_name': 'fileName', 'has_data': 'hasData', 'id': 'id', + 'tag': 'tag', 'tenant_id': 'tenantId', 'title': 'title', 'type': 'type', @@ -68,12 +67,8 @@ class OtaPackage(object): 'version': 'version' } - def __init__(self, additional_info=None, checksum=None, checksum_algorithm=None, content_type=None, created_time=None, data=None, data_size=None, device_profile_id=None, file_name=None, has_data=None, id=None, tenant_id=None, title=None, type=None, url=None, version=None, _configuration=None): # noqa: E501 + def __init__(self, additional_info=None, checksum=None, checksum_algorithm=None, content_type=None, created_time=None, data=None, data_size=None, device_profile_id=None, file_name=None, has_data=None, id=None, tag=None, tenant_id=None, title=None, type=None, url=None, version=None): # noqa: E501 """OtaPackage - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._additional_info = None self._checksum = None self._checksum_algorithm = None @@ -85,13 +80,13 @@ def __init__(self, additional_info=None, checksum=None, checksum_algorithm=None, self._file_name = None self._has_data = None self._id = None + self._tag = None self._tenant_id = None self._title = None self._type = None self._url = None self._version = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if checksum is not None: @@ -114,6 +109,8 @@ def __init__(self, additional_info=None, checksum=None, checksum_algorithm=None, self.has_data = has_data if id is not None: self.id = id + if tag is not None: + self.tag = tag if tenant_id is not None: self.tenant_id = tenant_id if title is not None: @@ -186,8 +183,7 @@ def checksum_algorithm(self, checksum_algorithm): :type: str """ allowed_values = ["MD5", "SHA256", "SHA384", "SHA512", "CRC32", "MURMUR3_32", "MURMUR3_128"] # noqa: E501 - if (self._configuration.client_side_validation and - checksum_algorithm not in allowed_values): + if checksum_algorithm not in allowed_values: raise ValueError( "Invalid value for `checksum_algorithm` ({0}), must be one of {1}" # noqa: E501 .format(checksum_algorithm, allowed_values) @@ -363,6 +359,27 @@ def id(self, id): self._id = id + @property + def tag(self): + """Gets the tag of this OtaPackage. # noqa: E501 + + + :return: The tag of this OtaPackage. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this OtaPackage. + + + :param tag: The tag of this OtaPackage. # noqa: E501 + :type: str + """ + + self._tag = tag + @property def tenant_id(self): """Gets the tenant_id of this OtaPackage. # noqa: E501 @@ -424,8 +441,7 @@ def type(self, type): :type: str """ allowed_values = ["FIRMWARE", "SOFTWARE"] # noqa: E501 - if (self._configuration.client_side_validation and - type not in allowed_values): + if type not in allowed_values: raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -515,11 +531,8 @@ def __eq__(self, other): if not isinstance(other, OtaPackage): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, OtaPackage): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 85b70ba9..5c6865e1 100644 --- a/tb_rest_client/models/models_ce/ota_package_id.py +++ b/tb_rest_client/models/models_ce/ota_package_id.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class OtaPackageId(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 @@ -38,15 +35,10 @@ class OtaPackageId(object): 'id': 'id' } - def __init__(self, id=None, _configuration=None): # noqa: E501 + def __init__(self, id=None): # noqa: E501 """OtaPackageId - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._id = None self.discriminator = None - if id is not None: self.id = id @@ -111,11 +103,8 @@ def __eq__(self, other): if not isinstance(other, OtaPackageId): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, OtaPackageId): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 bf81e1b5..fabf092b 100644 --- a/tb_rest_client/models/models_ce/ota_package_info.py +++ b/tb_rest_client/models/models_ce/ota_package_info.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class OtaPackageInfo(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 @@ -41,6 +38,7 @@ class OtaPackageInfo(object): 'file_name': 'str', 'has_data': 'bool', 'id': 'OtaPackageId', + 'tag': 'str', 'tenant_id': 'TenantId', 'title': 'str', 'type': 'str', @@ -59,6 +57,7 @@ class OtaPackageInfo(object): 'file_name': 'fileName', 'has_data': 'hasData', 'id': 'id', + 'tag': 'tag', 'tenant_id': 'tenantId', 'title': 'title', 'type': 'type', @@ -66,12 +65,8 @@ class OtaPackageInfo(object): 'version': 'version' } - def __init__(self, additional_info=None, checksum=None, checksum_algorithm=None, content_type=None, created_time=None, data_size=None, device_profile_id=None, file_name=None, has_data=None, id=None, tenant_id=None, title=None, type=None, url=None, version=None, _configuration=None): # noqa: E501 + def __init__(self, additional_info=None, checksum=None, checksum_algorithm=None, content_type=None, created_time=None, data_size=None, device_profile_id=None, file_name=None, has_data=None, id=None, tag=None, tenant_id=None, title=None, type=None, url=None, version=None): # noqa: E501 """OtaPackageInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._additional_info = None self._checksum = None self._checksum_algorithm = None @@ -82,13 +77,13 @@ def __init__(self, additional_info=None, checksum=None, checksum_algorithm=None, self._file_name = None self._has_data = None self._id = None + self._tag = None self._tenant_id = None self._title = None self._type = None self._url = None self._version = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if checksum is not None: @@ -109,6 +104,8 @@ def __init__(self, additional_info=None, checksum=None, checksum_algorithm=None, self.has_data = has_data if id is not None: self.id = id + if tag is not None: + self.tag = tag if tenant_id is not None: self.tenant_id = tenant_id if title is not None: @@ -181,8 +178,7 @@ def checksum_algorithm(self, checksum_algorithm): :type: str """ allowed_values = ["MD5", "SHA256", "SHA384", "SHA512", "CRC32", "MURMUR3_32", "MURMUR3_128"] # noqa: E501 - if (self._configuration.client_side_validation and - checksum_algorithm not in allowed_values): + if checksum_algorithm not in allowed_values: raise ValueError( "Invalid value for `checksum_algorithm` ({0}), must be one of {1}" # noqa: E501 .format(checksum_algorithm, allowed_values) @@ -337,6 +333,27 @@ def id(self, id): self._id = id + @property + def tag(self): + """Gets the tag of this OtaPackageInfo. # noqa: E501 + + + :return: The tag of this OtaPackageInfo. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this OtaPackageInfo. + + + :param tag: The tag of this OtaPackageInfo. # noqa: E501 + :type: str + """ + + self._tag = tag + @property def tenant_id(self): """Gets the tenant_id of this OtaPackageInfo. # noqa: E501 @@ -398,8 +415,7 @@ def type(self, type): :type: str """ allowed_values = ["FIRMWARE", "SOFTWARE"] # noqa: E501 - if (self._configuration.client_side_validation and - type not in allowed_values): + if type not in allowed_values: raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 .format(type, allowed_values) @@ -489,11 +505,8 @@ def __eq__(self, other): if not isinstance(other, OtaPackageInfo): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, OtaPackageInfo): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other diff --git a/tb_rest_client/models/models_ce/ota_package_ota_package_idchecksumchecksum_algorithm_body.py b/tb_rest_client/models/models_ce/ota_package_ota_package_idchecksumchecksum_algorithm_body.py new file mode 100644 index 00000000..b980fa63 --- /dev/null +++ b/tb_rest_client/models/models_ce/ota_package_ota_package_idchecksumchecksum_algorithm_body.py @@ -0,0 +1,113 @@ +# 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 OtaPackageOtaPackageIdchecksumchecksumAlgorithmBody(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 = { + 'file': 'str' + } + + attribute_map = { + 'file': 'file' + } + + def __init__(self, file=None): # noqa: E501 + """OtaPackageOtaPackageIdchecksumchecksumAlgorithmBody - a model defined in Swagger""" # noqa: E501 + self._file = None + self.discriminator = None + self.file = file + + @property + def file(self): + """Gets the file of this OtaPackageOtaPackageIdchecksumchecksumAlgorithmBody. # noqa: E501 + + file # noqa: E501 + + :return: The file of this OtaPackageOtaPackageIdchecksumchecksumAlgorithmBody. # noqa: E501 + :rtype: str + """ + return self._file + + @file.setter + def file(self, file): + """Sets the file of this OtaPackageOtaPackageIdchecksumchecksumAlgorithmBody. + + file # noqa: E501 + + :param file: The file of this OtaPackageOtaPackageIdchecksumchecksumAlgorithmBody. # noqa: E501 + :type: str + """ + if file is None: + raise ValueError("Invalid value for `file`, must not be `None`") # noqa: E501 + + self._file = file + + 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(OtaPackageOtaPackageIdchecksumchecksumAlgorithmBody, 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, OtaPackageOtaPackageIdchecksumchecksumAlgorithmBody): + 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 new file mode 100644 index 00000000..8f192119 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_alarm_data.py @@ -0,0 +1,188 @@ +# 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 PageDataAlarmData(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[AlarmData]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataAlarmData - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataAlarmData. # noqa: E501 + + + :return: The data of this PageDataAlarmData. # noqa: E501 + :rtype: list[AlarmData] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataAlarmData. + + + :param data: The data of this PageDataAlarmData. # noqa: E501 + :type: list[AlarmData] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataAlarmData. # noqa: E501 + + + :return: The has_next of this PageDataAlarmData. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataAlarmData. + + + :param has_next: The has_next of this PageDataAlarmData. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAlarmData. # noqa: E501 + + + :return: The total_elements of this PageDataAlarmData. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataAlarmData. + + + :param total_elements: The total_elements of this PageDataAlarmData. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAlarmData. # noqa: E501 + + + :return: The total_pages of this PageDataAlarmData. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataAlarmData. + + + :param total_pages: The total_pages of this PageDataAlarmData. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataAlarmData, 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, PageDataAlarmData): + 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_info.py b/tb_rest_client/models/models_ce/page_data_alarm_info.py new file mode 100644 index 00000000..0e9bec80 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_alarm_info.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataAlarmInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataAlarmInfo. # 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. + + + :param data: The data of this PageDataAlarmInfo. # noqa: E501 + :type: list[AlarmInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataAlarmInfo. # 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. + + + :param has_next: The has_next of this PageDataAlarmInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAlarmInfo. # 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. + + + :param total_elements: The total_elements of this PageDataAlarmInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAlarmInfo. # 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. + + + :param total_pages: The total_pages of this PageDataAlarmInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_asset.py b/tb_rest_client/models/models_ce/page_data_asset.py new file mode 100644 index 00000000..338343ea --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_asset.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataAsset - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataAsset. # 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. + + + :param data: The data of this PageDataAsset. # noqa: E501 + :type: list[Asset] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataAsset. # 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. + + + :param has_next: The has_next of this PageDataAsset. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAsset. # 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. + + + :param total_elements: The total_elements of this PageDataAsset. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAsset. # 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. + + + :param total_pages: The total_pages of this PageDataAsset. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_asset_info.py b/tb_rest_client/models/models_ce/page_data_asset_info.py new file mode 100644 index 00000000..356e9902 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_asset_info.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataAssetInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataAssetInfo. # 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. + + + :param data: The data of this PageDataAssetInfo. # noqa: E501 + :type: list[AssetInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataAssetInfo. # 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. + + + :param has_next: The has_next of this PageDataAssetInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAssetInfo. # 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. + + + :param total_elements: The total_elements of this PageDataAssetInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAssetInfo. # 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. + + + :param total_pages: The total_pages of this PageDataAssetInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_audit_log.py b/tb_rest_client/models/models_ce/page_data_audit_log.py new file mode 100644 index 00000000..a59f5ada --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_audit_log.py @@ -0,0 +1,188 @@ +# 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 PageDataAuditLog(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[AuditLog]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataAuditLog - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataAuditLog. # noqa: E501 + + + :return: The data of this PageDataAuditLog. # noqa: E501 + :rtype: list[AuditLog] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataAuditLog. + + + :param data: The data of this PageDataAuditLog. # noqa: E501 + :type: list[AuditLog] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataAuditLog. # noqa: E501 + + + :return: The has_next of this PageDataAuditLog. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataAuditLog. + + + :param has_next: The has_next of this PageDataAuditLog. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataAuditLog. # noqa: E501 + + + :return: The total_elements of this PageDataAuditLog. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataAuditLog. + + + :param total_elements: The total_elements of this PageDataAuditLog. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataAuditLog. # noqa: E501 + + + :return: The total_pages of this PageDataAuditLog. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataAuditLog. + + + :param total_pages: The total_pages of this PageDataAuditLog. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataAuditLog, 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, PageDataAuditLog): + 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_customer.py b/tb_rest_client/models/models_ce/page_data_customer.py new file mode 100644 index 00000000..1908c41b --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_customer.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataCustomer - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataCustomer. # 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. + + + :param data: The data of this PageDataCustomer. # noqa: E501 + :type: list[Customer] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataCustomer. # 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. + + + :param has_next: The has_next of this PageDataCustomer. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataCustomer. # 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. + + + :param total_elements: The total_elements of this PageDataCustomer. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataCustomer. # 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. + + + :param total_pages: The total_pages of this PageDataCustomer. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_dashboard_info.py b/tb_rest_client/models/models_ce/page_data_dashboard_info.py new file mode 100644 index 00000000..9d058bb0 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_dashboard_info.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataDashboardInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataDashboardInfo. # 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. + + + :param data: The data of this PageDataDashboardInfo. # noqa: E501 + :type: list[DashboardInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataDashboardInfo. # 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. + + + :param has_next: The has_next of this PageDataDashboardInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataDashboardInfo. # 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. + + + :param total_elements: The total_elements of this PageDataDashboardInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataDashboardInfo. # 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. + + + :param total_pages: The total_pages of this PageDataDashboardInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_device.py b/tb_rest_client/models/models_ce/page_data_device.py new file mode 100644 index 00000000..e3bdb47a --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_device.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataDevice - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataDevice. # 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. + + + :param data: The data of this PageDataDevice. # noqa: E501 + :type: list[Device] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataDevice. # 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. + + + :param has_next: The has_next of this PageDataDevice. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataDevice. # 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. + + + :param total_elements: The total_elements of this PageDataDevice. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataDevice. # 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. + + + :param total_pages: The total_pages of this PageDataDevice. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_device_info.py b/tb_rest_client/models/models_ce/page_data_device_info.py new file mode 100644 index 00000000..5e59340c --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_device_info.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataDeviceInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataDeviceInfo. # 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. + + + :param data: The data of this PageDataDeviceInfo. # noqa: E501 + :type: list[DeviceInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataDeviceInfo. # 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. + + + :param has_next: The has_next of this PageDataDeviceInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataDeviceInfo. # 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. + + + :param total_elements: The total_elements of this PageDataDeviceInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataDeviceInfo. # 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. + + + :param total_pages: The total_pages of this PageDataDeviceInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_device_profile.py b/tb_rest_client/models/models_ce/page_data_device_profile.py new file mode 100644 index 00000000..6ecbc342 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_device_profile.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataDeviceProfile - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataDeviceProfile. # 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. + + + :param data: The data of this PageDataDeviceProfile. # noqa: E501 + :type: list[DeviceProfile] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataDeviceProfile. # 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. + + + :param has_next: The has_next of this PageDataDeviceProfile. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataDeviceProfile. # 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. + + + :param total_elements: The total_elements of this PageDataDeviceProfile. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataDeviceProfile. # 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. + + + :param total_pages: The total_pages of this PageDataDeviceProfile. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_device_profile_info.py b/tb_rest_client/models/models_ce/page_data_device_profile_info.py new file mode 100644 index 00000000..1d848fd5 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_device_profile_info.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataDeviceProfileInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataDeviceProfileInfo. # 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. + + + :param data: The data of this PageDataDeviceProfileInfo. # noqa: E501 + :type: list[DeviceProfileInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataDeviceProfileInfo. # 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. + + + :param has_next: The has_next of this PageDataDeviceProfileInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataDeviceProfileInfo. # 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. + + + :param total_elements: The total_elements of this PageDataDeviceProfileInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataDeviceProfileInfo. # 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. + + + :param total_pages: The total_pages of this PageDataDeviceProfileInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_edge.py b/tb_rest_client/models/models_ce/page_data_edge.py new file mode 100644 index 00000000..ead69cf9 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_edge.py @@ -0,0 +1,188 @@ +# 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 PageDataEdge(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[Edge]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataEdge - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataEdge. # noqa: E501 + + + :return: The data of this PageDataEdge. # noqa: E501 + :rtype: list[Edge] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataEdge. + + + :param data: The data of this PageDataEdge. # noqa: E501 + :type: list[Edge] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataEdge. # noqa: E501 + + + :return: The has_next of this PageDataEdge. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataEdge. + + + :param has_next: The has_next of this PageDataEdge. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEdge. # noqa: E501 + + + :return: The total_elements of this PageDataEdge. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataEdge. + + + :param total_elements: The total_elements of this PageDataEdge. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEdge. # noqa: E501 + + + :return: The total_pages of this PageDataEdge. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataEdge. + + + :param total_pages: The total_pages of this PageDataEdge. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataEdge, 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, PageDataEdge): + 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_edge_event.py b/tb_rest_client/models/models_ce/page_data_edge_event.py new file mode 100644 index 00000000..361239f2 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_edge_event.py @@ -0,0 +1,188 @@ +# 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 PageDataEdgeEvent(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[EdgeEvent]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataEdgeEvent - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataEdgeEvent. # noqa: E501 + + + :return: The data of this PageDataEdgeEvent. # noqa: E501 + :rtype: list[EdgeEvent] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataEdgeEvent. + + + :param data: The data of this PageDataEdgeEvent. # noqa: E501 + :type: list[EdgeEvent] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataEdgeEvent. # noqa: E501 + + + :return: The has_next of this PageDataEdgeEvent. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataEdgeEvent. + + + :param has_next: The has_next of this PageDataEdgeEvent. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEdgeEvent. # noqa: E501 + + + :return: The total_elements of this PageDataEdgeEvent. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataEdgeEvent. + + + :param total_elements: The total_elements of this PageDataEdgeEvent. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEdgeEvent. # noqa: E501 + + + :return: The total_pages of this PageDataEdgeEvent. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataEdgeEvent. + + + :param total_pages: The total_pages of this PageDataEdgeEvent. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataEdgeEvent, 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, PageDataEdgeEvent): + 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_edge_info.py b/tb_rest_client/models/models_ce/page_data_edge_info.py new file mode 100644 index 00000000..fa627c0d --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_edge_info.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataEdgeInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataEdgeInfo. # 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. + + + :param data: The data of this PageDataEdgeInfo. # noqa: E501 + :type: list[EdgeInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataEdgeInfo. # 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. + + + :param has_next: The has_next of this PageDataEdgeInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEdgeInfo. # 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. + + + :param total_elements: The total_elements of this PageDataEdgeInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEdgeInfo. # 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. + + + :param total_pages: The total_pages of this PageDataEdgeInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_entity_data.py b/tb_rest_client/models/models_ce/page_data_entity_data.py new file mode 100644 index 00000000..98d6a30c --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_entity_data.py @@ -0,0 +1,188 @@ +# 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 PageDataEntityData(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[EntityData]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataEntityData - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataEntityData. # noqa: E501 + + + :return: The data of this PageDataEntityData. # noqa: E501 + :rtype: list[EntityData] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataEntityData. + + + :param data: The data of this PageDataEntityData. # noqa: E501 + :type: list[EntityData] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataEntityData. # noqa: E501 + + + :return: The has_next of this PageDataEntityData. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataEntityData. + + + :param has_next: The has_next of this PageDataEntityData. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEntityData. # noqa: E501 + + + :return: The total_elements of this PageDataEntityData. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataEntityData. + + + :param total_elements: The total_elements of this PageDataEntityData. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEntityData. # noqa: E501 + + + :return: The total_pages of this PageDataEntityData. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataEntityData. + + + :param total_pages: The total_pages of this PageDataEntityData. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataEntityData, 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, PageDataEntityData): + 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_entity_info.py b/tb_rest_client/models/models_ce/page_data_entity_info.py new file mode 100644 index 00000000..37242d67 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_entity_info.py @@ -0,0 +1,188 @@ +# 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 PageDataEntityInfo(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[EntityInfo]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataEntityInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataEntityInfo. # noqa: E501 + + + :return: The data of this PageDataEntityInfo. # noqa: E501 + :rtype: list[EntityInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataEntityInfo. + + + :param data: The data of this PageDataEntityInfo. # noqa: E501 + :type: list[EntityInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataEntityInfo. # noqa: E501 + + + :return: The has_next of this PageDataEntityInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataEntityInfo. + + + :param has_next: The has_next of this PageDataEntityInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEntityInfo. # noqa: E501 + + + :return: The total_elements of this PageDataEntityInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataEntityInfo. + + + :param total_elements: The total_elements of this PageDataEntityInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEntityInfo. # noqa: E501 + + + :return: The total_pages of this PageDataEntityInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataEntityInfo. + + + :param total_pages: The total_pages of this PageDataEntityInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataEntityInfo, 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, PageDataEntityInfo): + 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_entity_view.py b/tb_rest_client/models/models_ce/page_data_entity_view.py new file mode 100644 index 00000000..18af4ac8 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_entity_view.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataEntityView - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataEntityView. # 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. + + + :param data: The data of this PageDataEntityView. # noqa: E501 + :type: list[EntityView] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataEntityView. # 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. + + + :param has_next: The has_next of this PageDataEntityView. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEntityView. # 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. + + + :param total_elements: The total_elements of this PageDataEntityView. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEntityView. # 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. + + + :param total_pages: The total_pages of this PageDataEntityView. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_entity_view_info.py b/tb_rest_client/models/models_ce/page_data_entity_view_info.py new file mode 100644 index 00000000..779ac7b8 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_entity_view_info.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataEntityViewInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataEntityViewInfo. # 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. + + + :param data: The data of this PageDataEntityViewInfo. # noqa: E501 + :type: list[EntityViewInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataEntityViewInfo. # 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. + + + :param has_next: The has_next of this PageDataEntityViewInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEntityViewInfo. # 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. + + + :param total_elements: The total_elements of this PageDataEntityViewInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEntityViewInfo. # 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. + + + :param total_pages: The total_pages of this PageDataEntityViewInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_event.py b/tb_rest_client/models/models_ce/page_data_event.py new file mode 100644 index 00000000..546d50f8 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_event.py @@ -0,0 +1,188 @@ +# 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 PageDataEvent(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[Event]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataEvent - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataEvent. # noqa: E501 + + + :return: The data of this PageDataEvent. # noqa: E501 + :rtype: list[Event] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataEvent. + + + :param data: The data of this PageDataEvent. # noqa: E501 + :type: list[Event] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataEvent. # noqa: E501 + + + :return: The has_next of this PageDataEvent. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataEvent. + + + :param has_next: The has_next of this PageDataEvent. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEvent. # noqa: E501 + + + :return: The total_elements of this PageDataEvent. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataEvent. + + + :param total_elements: The total_elements of this PageDataEvent. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEvent. # noqa: E501 + + + :return: The total_pages of this PageDataEvent. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataEvent. + + + :param total_pages: The total_pages of this PageDataEvent. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataEvent, 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, PageDataEvent): + 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 new file mode 100644 index 00000000..f72cbd00 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_ota_package_info.py @@ -0,0 +1,188 @@ +# 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 PageDataOtaPackageInfo(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[OtaPackageInfo]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataOtaPackageInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataOtaPackageInfo. # noqa: E501 + + + :return: The data of this PageDataOtaPackageInfo. # noqa: E501 + :rtype: list[OtaPackageInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataOtaPackageInfo. + + + :param data: The data of this PageDataOtaPackageInfo. # noqa: E501 + :type: list[OtaPackageInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataOtaPackageInfo. # noqa: E501 + + + :return: The has_next of this PageDataOtaPackageInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataOtaPackageInfo. + + + :param has_next: The has_next of this PageDataOtaPackageInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataOtaPackageInfo. # noqa: E501 + + + :return: The total_elements of this PageDataOtaPackageInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataOtaPackageInfo. + + + :param total_elements: The total_elements of this PageDataOtaPackageInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataOtaPackageInfo. # noqa: E501 + + + :return: The total_pages of this PageDataOtaPackageInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataOtaPackageInfo. + + + :param total_pages: The total_pages of this PageDataOtaPackageInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataOtaPackageInfo, 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, PageDataOtaPackageInfo): + 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_rpc.py b/tb_rest_client/models/models_ce/page_data_rpc.py new file mode 100644 index 00000000..843b0dc1 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_rpc.py @@ -0,0 +1,188 @@ +# 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 PageDataRpc(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[Rpc]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataRpc - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataRpc. # noqa: E501 + + + :return: The data of this PageDataRpc. # noqa: E501 + :rtype: list[Rpc] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataRpc. + + + :param data: The data of this PageDataRpc. # noqa: E501 + :type: list[Rpc] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataRpc. # noqa: E501 + + + :return: The has_next of this PageDataRpc. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataRpc. + + + :param has_next: The has_next of this PageDataRpc. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataRpc. # noqa: E501 + + + :return: The total_elements of this PageDataRpc. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataRpc. + + + :param total_elements: The total_elements of this PageDataRpc. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataRpc. # noqa: E501 + + + :return: The total_pages of this PageDataRpc. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataRpc. + + + :param total_pages: The total_pages of this PageDataRpc. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataRpc, 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, PageDataRpc): + 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_rule_chain.py b/tb_rest_client/models/models_ce/page_data_rule_chain.py new file mode 100644 index 00000000..0910b7dc --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_rule_chain.py @@ -0,0 +1,188 @@ +# 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 PageDataRuleChain(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[RuleChain]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataRuleChain - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataRuleChain. # noqa: E501 + + + :return: The data of this PageDataRuleChain. # noqa: E501 + :rtype: list[RuleChain] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataRuleChain. + + + :param data: The data of this PageDataRuleChain. # noqa: E501 + :type: list[RuleChain] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataRuleChain. # noqa: E501 + + + :return: The has_next of this PageDataRuleChain. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataRuleChain. + + + :param has_next: The has_next of this PageDataRuleChain. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataRuleChain. # noqa: E501 + + + :return: The total_elements of this PageDataRuleChain. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataRuleChain. + + + :param total_elements: The total_elements of this PageDataRuleChain. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataRuleChain. # noqa: E501 + + + :return: The total_pages of this PageDataRuleChain. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataRuleChain. + + + :param total_pages: The total_pages of this PageDataRuleChain. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataRuleChain, 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, PageDataRuleChain): + 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_tb_resource_info.py b/tb_rest_client/models/models_ce/page_data_tb_resource_info.py new file mode 100644 index 00000000..2de807b6 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_tb_resource_info.py @@ -0,0 +1,188 @@ +# 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 PageDataTbResourceInfo(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[TbResourceInfo]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataTbResourceInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataTbResourceInfo. # noqa: E501 + + + :return: The data of this PageDataTbResourceInfo. # noqa: E501 + :rtype: list[TbResourceInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataTbResourceInfo. + + + :param data: The data of this PageDataTbResourceInfo. # noqa: E501 + :type: list[TbResourceInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataTbResourceInfo. # noqa: E501 + + + :return: The has_next of this PageDataTbResourceInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataTbResourceInfo. + + + :param has_next: The has_next of this PageDataTbResourceInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataTbResourceInfo. # noqa: E501 + + + :return: The total_elements of this PageDataTbResourceInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataTbResourceInfo. + + + :param total_elements: The total_elements of this PageDataTbResourceInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataTbResourceInfo. # noqa: E501 + + + :return: The total_pages of this PageDataTbResourceInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataTbResourceInfo. + + + :param total_pages: The total_pages of this PageDataTbResourceInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataTbResourceInfo, 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, PageDataTbResourceInfo): + 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_tenant.py b/tb_rest_client/models/models_ce/page_data_tenant.py new file mode 100644 index 00000000..cf6492f5 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_tenant.py @@ -0,0 +1,188 @@ +# 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 PageDataTenant(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[Tenant]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataTenant - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataTenant. # noqa: E501 + + + :return: The data of this PageDataTenant. # noqa: E501 + :rtype: list[Tenant] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataTenant. + + + :param data: The data of this PageDataTenant. # noqa: E501 + :type: list[Tenant] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataTenant. # noqa: E501 + + + :return: The has_next of this PageDataTenant. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataTenant. + + + :param has_next: The has_next of this PageDataTenant. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataTenant. # noqa: E501 + + + :return: The total_elements of this PageDataTenant. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataTenant. + + + :param total_elements: The total_elements of this PageDataTenant. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataTenant. # noqa: E501 + + + :return: The total_pages of this PageDataTenant. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataTenant. + + + :param total_pages: The total_pages of this PageDataTenant. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataTenant, 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, PageDataTenant): + 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_tenant_info.py b/tb_rest_client/models/models_ce/page_data_tenant_info.py new file mode 100644 index 00000000..d9f52ab4 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_tenant_info.py @@ -0,0 +1,188 @@ +# 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 PageDataTenantInfo(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[TenantInfo]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataTenantInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataTenantInfo. # noqa: E501 + + + :return: The data of this PageDataTenantInfo. # noqa: E501 + :rtype: list[TenantInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataTenantInfo. + + + :param data: The data of this PageDataTenantInfo. # noqa: E501 + :type: list[TenantInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataTenantInfo. # noqa: E501 + + + :return: The has_next of this PageDataTenantInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataTenantInfo. + + + :param has_next: The has_next of this PageDataTenantInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataTenantInfo. # noqa: E501 + + + :return: The total_elements of this PageDataTenantInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataTenantInfo. + + + :param total_elements: The total_elements of this PageDataTenantInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataTenantInfo. # noqa: E501 + + + :return: The total_pages of this PageDataTenantInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataTenantInfo. + + + :param total_pages: The total_pages of this PageDataTenantInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataTenantInfo, 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, PageDataTenantInfo): + 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_tenant_profile.py b/tb_rest_client/models/models_ce/page_data_tenant_profile.py new file mode 100644 index 00000000..74279c02 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_tenant_profile.py @@ -0,0 +1,188 @@ +# 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 PageDataTenantProfile(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[TenantProfile]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataTenantProfile - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataTenantProfile. # noqa: E501 + + + :return: The data of this PageDataTenantProfile. # noqa: E501 + :rtype: list[TenantProfile] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataTenantProfile. + + + :param data: The data of this PageDataTenantProfile. # noqa: E501 + :type: list[TenantProfile] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataTenantProfile. # noqa: E501 + + + :return: The has_next of this PageDataTenantProfile. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataTenantProfile. + + + :param has_next: The has_next of this PageDataTenantProfile. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataTenantProfile. # noqa: E501 + + + :return: The total_elements of this PageDataTenantProfile. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataTenantProfile. + + + :param total_elements: The total_elements of this PageDataTenantProfile. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataTenantProfile. # noqa: E501 + + + :return: The total_pages of this PageDataTenantProfile. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataTenantProfile. + + + :param total_pages: The total_pages of this PageDataTenantProfile. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataTenantProfile, 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, PageDataTenantProfile): + 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_user.py b/tb_rest_client/models/models_ce/page_data_user.py new file mode 100644 index 00000000..c5ecdc14 --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_user.py @@ -0,0 +1,188 @@ +# 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 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]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataUser - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataUser. # 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. + + + :param data: The data of this PageDataUser. # noqa: E501 + :type: list[User] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataUser. # 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. + + + :param has_next: The has_next of this PageDataUser. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataUser. # 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. + + + :param total_elements: The total_elements of this PageDataUser. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataUser. # 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. + + + :param total_pages: The total_pages of this PageDataUser. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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_ce/page_data_widgets_bundle.py b/tb_rest_client/models/models_ce/page_data_widgets_bundle.py new file mode 100644 index 00000000..9a86173b --- /dev/null +++ b/tb_rest_client/models/models_ce/page_data_widgets_bundle.py @@ -0,0 +1,188 @@ +# 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 PageDataWidgetsBundle(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[WidgetsBundle]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataWidgetsBundle - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataWidgetsBundle. # noqa: E501 + + + :return: The data of this PageDataWidgetsBundle. # noqa: E501 + :rtype: list[WidgetsBundle] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataWidgetsBundle. + + + :param data: The data of this PageDataWidgetsBundle. # noqa: E501 + :type: list[WidgetsBundle] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataWidgetsBundle. # noqa: E501 + + + :return: The has_next of this PageDataWidgetsBundle. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataWidgetsBundle. + + + :param has_next: The has_next of this PageDataWidgetsBundle. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataWidgetsBundle. # noqa: E501 + + + :return: The total_elements of this PageDataWidgetsBundle. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataWidgetsBundle. + + + :param total_elements: The total_elements of this PageDataWidgetsBundle. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataWidgetsBundle. # noqa: E501 + + + :return: The total_pages of this PageDataWidgetsBundle. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataWidgetsBundle. + + + :param total_pages: The total_pages of this PageDataWidgetsBundle. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataWidgetsBundle, 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, PageDataWidgetsBundle): + 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/relation_entity_type_filter.py b/tb_rest_client/models/models_ce/relation_entity_type_filter.py new file mode 100644 index 00000000..cfcdb206 --- /dev/null +++ b/tb_rest_client/models/models_ce/relation_entity_type_filter.py @@ -0,0 +1,145 @@ +# 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 RelationEntityTypeFilter(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 = { + 'relation_type': 'str', + 'entity_types': 'list[str]' + } + + attribute_map = { + 'relation_type': 'relationType', + 'entity_types': 'entityTypes' + } + + def __init__(self, relation_type=None, entity_types=None): # noqa: E501 + """RelationEntityTypeFilter - a model defined in Swagger""" # noqa: E501 + self._relation_type = None + self._entity_types = None + self.discriminator = None + self.relation_type = relation_type + self.entity_types = entity_types + + @property + def relation_type(self): + """Gets the relation_type of this RelationEntityTypeFilter. # noqa: E501 + + + :return: The relation_type of this RelationEntityTypeFilter. # noqa: E501 + :rtype: str + """ + return self._relation_type + + @relation_type.setter + def relation_type(self, relation_type): + """Sets the relation_type of this RelationEntityTypeFilter. + + + :param relation_type: The relation_type of this RelationEntityTypeFilter. # noqa: E501 + :type: str + """ + if relation_type is None: + raise ValueError("Invalid value for `relation_type`, must not be `None`") # noqa: E501 + + self._relation_type = relation_type + + @property + def entity_types(self): + """Gets the entity_types of this RelationEntityTypeFilter. # noqa: E501 + + + :return: The entity_types of this RelationEntityTypeFilter. # noqa: E501 + :rtype: list[str] + """ + return self._entity_types + + @entity_types.setter + def entity_types(self, entity_types): + """Sets the entity_types of this RelationEntityTypeFilter. + + + :param entity_types: The entity_types of this RelationEntityTypeFilter. # noqa: E501 + :type: list[str] + """ + if entity_types is None: + raise ValueError("Invalid value for `entity_types`, must not be `None`") # noqa: E501 + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "RULE_CHAIN", "RULE_NODE", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # 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 + + 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(RelationEntityTypeFilter, 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, RelationEntityTypeFilter): + 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/relations_search_parameters.py b/tb_rest_client/models/models_ce/relations_search_parameters.py index 2770e7c5..772bede4 100644 --- a/tb_rest_client/models/models_ce/relations_search_parameters.py +++ b/tb_rest_client/models/models_ce/relations_search_parameters.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 RelationsSearchParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -53,7 +49,6 @@ class RelationsSearchParameters(object): def __init__(self, entity_id=None, root_id=None, root_type=None, direction=None, relation_type_group=None, max_level=None, fetch_last_level_only=None): # noqa: E501 """RelationsSearchParameters - a model defined in Swagger""" # noqa: E501 - self._entity_id = None self._root_id = None self._root_type = None @@ -62,7 +57,6 @@ def __init__(self, entity_id=None, root_id=None, root_type=None, direction=None, self._max_level = None self._fetch_last_level_only = None self.discriminator = None - if entity_id is not None: self.entity_id = entity_id self.root_id = root_id @@ -136,7 +130,7 @@ def root_type(self, root_type): """ if root_type is None: raise ValueError("Invalid value for `root_type`, must not be `None`") # noqa: E501 - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "RULE_CHAIN", "RULE_NODE", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE"] # noqa: E501 + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "RULE_CHAIN", "RULE_NODE", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # noqa: E501 if root_type not in allowed_values: raise ValueError( "Invalid value for `root_type` ({0}), must be one of {1}" # noqa: E501 @@ -194,7 +188,7 @@ def relation_type_group(self, relation_type_group): """ if relation_type_group is None: raise ValueError("Invalid value for `relation_type_group`, must not be `None`") # noqa: E501 - allowed_values = ["COMMON", "ALARM", "DASHBOARD", "RULE_CHAIN", "RULE_NODE"] # noqa: E501 + allowed_values = ["COMMON", "ALARM", "DASHBOARD", "RULE_CHAIN", "RULE_NODE", "EDGE", "EDGE_AUTO_ASSIGN_RULE_CHAIN"] # noqa: E501 if relation_type_group not in allowed_values: raise ValueError( "Invalid value for `relation_type_group` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_ce/resource.py b/tb_rest_client/models/models_ce/resource.py new file mode 100644 index 00000000..8900e696 --- /dev/null +++ b/tb_rest_client/models/models_ce/resource.py @@ -0,0 +1,292 @@ +# 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 Resource(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', + 'file': 'file', + 'filename': 'str', + 'input_stream': 'InputStream', + 'open': 'bool', + 'readable': 'bool', + 'uri': 'URI', + 'url': 'URL' + } + + attribute_map = { + 'description': 'description', + 'file': 'file', + 'filename': 'filename', + 'input_stream': 'inputStream', + 'open': 'open', + 'readable': 'readable', + 'uri': 'uri', + 'url': 'url' + } + + def __init__(self, description=None, file=None, filename=None, input_stream=None, open=None, readable=None, uri=None, url=None): # noqa: E501 + """Resource - a model defined in Swagger""" # noqa: E501 + self._description = None + self._file = None + self._filename = None + self._input_stream = None + self._open = None + self._readable = None + self._uri = None + self._url = None + self.discriminator = None + if description is not None: + self.description = description + if file is not None: + self.file = file + if filename is not None: + self.filename = filename + if input_stream is not None: + self.input_stream = input_stream + if open is not None: + self.open = open + if readable is not None: + self.readable = readable + if uri is not None: + self.uri = uri + if url is not None: + self.url = url + + @property + def description(self): + """Gets the description of this Resource. # noqa: E501 + + + :return: The description of this Resource. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Resource. + + + :param description: The description of this Resource. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def file(self): + """Gets the file of this Resource. # noqa: E501 + + + :return: The file of this Resource. # noqa: E501 + :rtype: file + """ + return self._file + + @file.setter + def file(self, file): + """Sets the file of this Resource. + + + :param file: The file of this Resource. # noqa: E501 + :type: file + """ + + self._file = file + + @property + def filename(self): + """Gets the filename of this Resource. # noqa: E501 + + + :return: The filename of this Resource. # noqa: E501 + :rtype: str + """ + return self._filename + + @filename.setter + def filename(self, filename): + """Sets the filename of this Resource. + + + :param filename: The filename of this Resource. # noqa: E501 + :type: str + """ + + self._filename = filename + + @property + def input_stream(self): + """Gets the input_stream of this Resource. # noqa: E501 + + + :return: The input_stream of this Resource. # noqa: E501 + :rtype: InputStream + """ + return self._input_stream + + @input_stream.setter + def input_stream(self, input_stream): + """Sets the input_stream of this Resource. + + + :param input_stream: The input_stream of this Resource. # noqa: E501 + :type: InputStream + """ + + self._input_stream = input_stream + + @property + def open(self): + """Gets the open of this Resource. # noqa: E501 + + + :return: The open of this Resource. # noqa: E501 + :rtype: bool + """ + return self._open + + @open.setter + def open(self, open): + """Sets the open of this Resource. + + + :param open: The open of this Resource. # noqa: E501 + :type: bool + """ + + self._open = open + + @property + def readable(self): + """Gets the readable of this Resource. # noqa: E501 + + + :return: The readable of this Resource. # noqa: E501 + :rtype: bool + """ + return self._readable + + @readable.setter + def readable(self, readable): + """Sets the readable of this Resource. + + + :param readable: The readable of this Resource. # noqa: E501 + :type: bool + """ + + self._readable = readable + + @property + def uri(self): + """Gets the uri of this Resource. # noqa: E501 + + + :return: The uri of this Resource. # noqa: E501 + :rtype: URI + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this Resource. + + + :param uri: The uri of this Resource. # noqa: E501 + :type: URI + """ + + self._uri = uri + + @property + def url(self): + """Gets the url of this Resource. # noqa: E501 + + + :return: The url of this Resource. # noqa: E501 + :rtype: URL + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this Resource. + + + :param url: The url of this Resource. # noqa: E501 + :type: URL + """ + + self._url = url + + 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(Resource, 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, Resource): + 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/response_entity.py b/tb_rest_client/models/models_ce/response_entity.py index 1be38f02..3b3b703d 100644 --- a/tb_rest_client/models/models_ce/response_entity.py +++ b/tb_rest_client/models/models_ce/response_entity.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 ResponseEntity(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 @@ -45,12 +41,10 @@ class ResponseEntity(object): def __init__(self, body=None, status_code=None, status_code_value=None): # noqa: E501 """ResponseEntity - a model defined in Swagger""" # noqa: E501 - self._body = None self._status_code = None self._status_code_value = None self.discriminator = None - if body is not None: self.body = body if status_code is not None: diff --git a/tb_rest_client/models/models_ce/rpc.py b/tb_rest_client/models/models_ce/rpc.py new file mode 100644 index 00000000..95e3a35b --- /dev/null +++ b/tb_rest_client/models/models_ce/rpc.py @@ -0,0 +1,324 @@ +# 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 Rpc(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': 'str', + 'created_time': 'int', + 'device_id': 'DeviceId', + 'expiration_time': 'int', + 'id': 'RpcId', + 'request': 'str', + 'response': 'str', + 'status': 'str', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'additional_info': 'additionalInfo', + 'created_time': 'createdTime', + 'device_id': 'deviceId', + 'expiration_time': 'expirationTime', + 'id': 'id', + 'request': 'request', + 'response': 'response', + 'status': 'status', + 'tenant_id': 'tenantId' + } + + def __init__(self, additional_info=None, created_time=None, device_id=None, expiration_time=None, id=None, request=None, response=None, status=None, tenant_id=None): # noqa: E501 + """Rpc - a model defined in Swagger""" # noqa: E501 + self._additional_info = None + self._created_time = None + self._device_id = None + self._expiration_time = None + self._id = None + self._request = None + self._response = None + self._status = None + self._tenant_id = None + self.discriminator = None + if additional_info is not None: + self.additional_info = additional_info + if created_time is not None: + self.created_time = created_time + if device_id is not None: + self.device_id = device_id + if expiration_time is not None: + self.expiration_time = expiration_time + if id is not None: + self.id = id + if request is not None: + self.request = request + if response is not None: + self.response = response + if status is not None: + self.status = status + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def additional_info(self): + """Gets the additional_info of this Rpc. # noqa: E501 + + + :return: The additional_info of this Rpc. # noqa: E501 + :rtype: str + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this Rpc. + + + :param additional_info: The additional_info of this Rpc. # noqa: E501 + :type: str + """ + + self._additional_info = additional_info + + @property + def created_time(self): + """Gets the created_time of this Rpc. # noqa: E501 + + + :return: The created_time of this Rpc. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this Rpc. + + + :param created_time: The created_time of this Rpc. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def device_id(self): + """Gets the device_id of this Rpc. # noqa: E501 + + + :return: The device_id of this Rpc. # noqa: E501 + :rtype: DeviceId + """ + return self._device_id + + @device_id.setter + def device_id(self, device_id): + """Sets the device_id of this Rpc. + + + :param device_id: The device_id of this Rpc. # noqa: E501 + :type: DeviceId + """ + + self._device_id = device_id + + @property + def expiration_time(self): + """Gets the expiration_time of this Rpc. # noqa: E501 + + + :return: The expiration_time of this Rpc. # noqa: E501 + :rtype: int + """ + return self._expiration_time + + @expiration_time.setter + def expiration_time(self, expiration_time): + """Sets the expiration_time of this Rpc. + + + :param expiration_time: The expiration_time of this Rpc. # noqa: E501 + :type: int + """ + + self._expiration_time = expiration_time + + @property + def id(self): + """Gets the id of this Rpc. # noqa: E501 + + + :return: The id of this Rpc. # noqa: E501 + :rtype: RpcId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Rpc. + + + :param id: The id of this Rpc. # noqa: E501 + :type: RpcId + """ + + self._id = id + + @property + def request(self): + """Gets the request of this Rpc. # noqa: E501 + + + :return: The request of this Rpc. # noqa: E501 + :rtype: str + """ + return self._request + + @request.setter + def request(self, request): + """Sets the request of this Rpc. + + + :param request: The request of this Rpc. # noqa: E501 + :type: str + """ + + self._request = request + + @property + def response(self): + """Gets the response of this Rpc. # noqa: E501 + + + :return: The response of this Rpc. # noqa: E501 + :rtype: str + """ + return self._response + + @response.setter + def response(self, response): + """Sets the response of this Rpc. + + + :param response: The response of this Rpc. # noqa: E501 + :type: str + """ + + self._response = response + + @property + def status(self): + """Gets the status of this Rpc. # noqa: E501 + + + :return: The status of this Rpc. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Rpc. + + + :param status: The status of this Rpc. # noqa: E501 + :type: str + """ + allowed_values = ["QUEUED", "DELIVERED", "SUCCESSFUL", "TIMEOUT", "FAILED"] # 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 tenant_id(self): + """Gets the tenant_id of this Rpc. # noqa: E501 + + + :return: The tenant_id of this Rpc. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this Rpc. + + + :param tenant_id: The tenant_id of this Rpc. # 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(Rpc, 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, Rpc): + 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/rpc_id.py b/tb_rest_client/models/models_ce/rpc_id.py new file mode 100644 index 00000000..d45b2b4a --- /dev/null +++ b/tb_rest_client/models/models_ce/rpc_id.py @@ -0,0 +1,110 @@ +# 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 RpcId(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 + """RpcId - a model defined in Swagger""" # noqa: E501 + self._id = None + self.discriminator = None + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this RpcId. # noqa: E501 + + + :return: The id of this RpcId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this RpcId. + + + :param id: The id of this RpcId. # noqa: E501 + :type: str + """ + + 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(RpcId, 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, RpcId): + 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.py b/tb_rest_client/models/models_ce/rule_chain.py index 64ebd787..01d42f31 100644 --- a/tb_rest_client/models/models_ce/rule_chain.py +++ b/tb_rest_client/models/models_ce/rule_chain.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 RuleChain(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -40,7 +36,8 @@ class RuleChain(object): 'id': 'RuleChainId', 'name': 'str', 'root': 'bool', - 'tenant_id': 'TenantId' + 'tenant_id': 'TenantId', + 'type': 'str' } attribute_map = { @@ -52,12 +49,12 @@ class RuleChain(object): 'id': 'id', 'name': 'name', 'root': 'root', - 'tenant_id': 'tenantId' + 'tenant_id': 'tenantId', + 'type': 'type' } - def __init__(self, additional_info=None, configuration=None, created_time=None, debug_mode=None, first_rule_node_id=None, id=None, name=None, root=None, tenant_id=None): # noqa: E501 + def __init__(self, additional_info=None, configuration=None, created_time=None, debug_mode=None, first_rule_node_id=None, id=None, name=None, root=None, tenant_id=None, type=None): # noqa: E501 """RuleChain - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._configuration = None self._created_time = None @@ -67,8 +64,8 @@ def __init__(self, additional_info=None, configuration=None, created_time=None, self._name = None self._root = None self._tenant_id = None + self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if configuration is not None: @@ -87,6 +84,8 @@ def __init__(self, additional_info=None, configuration=None, created_time=None, self.root = root if tenant_id is not None: self.tenant_id = tenant_id + if type is not None: + self.type = type @property def additional_info(self): @@ -277,6 +276,33 @@ def tenant_id(self, tenant_id): self._tenant_id = tenant_id + @property + def type(self): + """Gets the type of this RuleChain. # noqa: E501 + + + :return: The type of this RuleChain. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this RuleChain. + + + :param type: The type of this RuleChain. # noqa: E501 + :type: str + """ + allowed_values = ["CORE", "EDGE"] # 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 = {} 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 64185169..5608b174 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 RuleChainConnectionInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -47,13 +43,11 @@ class RuleChainConnectionInfo(object): def __init__(self, additional_info=None, from_index=None, target_rule_chain_id=None, type=None): # noqa: E501 """RuleChainConnectionInfo - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._from_index = None self._target_rule_chain_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if from_index is not None: diff --git a/tb_rest_client/models/models_ce/rule_chain_data.py b/tb_rest_client/models/models_ce/rule_chain_data.py new file mode 100644 index 00000000..144ec4b9 --- /dev/null +++ b/tb_rest_client/models/models_ce/rule_chain_data.py @@ -0,0 +1,136 @@ +# 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 RuleChainData(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 = { + 'metadata': 'list[RuleChainMetaData]', + 'rule_chains': 'list[RuleChain]' + } + + attribute_map = { + 'metadata': 'metadata', + 'rule_chains': 'ruleChains' + } + + def __init__(self, metadata=None, rule_chains=None): # noqa: E501 + """RuleChainData - a model defined in Swagger""" # noqa: E501 + self._metadata = None + self._rule_chains = None + self.discriminator = None + if metadata is not None: + self.metadata = metadata + if rule_chains is not None: + self.rule_chains = rule_chains + + @property + def metadata(self): + """Gets the metadata of this RuleChainData. # noqa: E501 + + + :return: The metadata of this RuleChainData. # noqa: E501 + :rtype: list[RuleChainMetaData] + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this RuleChainData. + + + :param metadata: The metadata of this RuleChainData. # noqa: E501 + :type: list[RuleChainMetaData] + """ + + self._metadata = metadata + + @property + def rule_chains(self): + """Gets the rule_chains of this RuleChainData. # noqa: E501 + + + :return: The rule_chains of this RuleChainData. # noqa: E501 + :rtype: list[RuleChain] + """ + return self._rule_chains + + @rule_chains.setter + def rule_chains(self, rule_chains): + """Sets the rule_chains of this RuleChainData. + + + :param rule_chains: The rule_chains of this RuleChainData. # noqa: E501 + :type: list[RuleChain] + """ + + self._rule_chains = rule_chains + + 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(RuleChainData, 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, RuleChainData): + 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_id.py b/tb_rest_client/models/models_ce/rule_chain_id.py index 334c86ad..6d69c4bf 100644 --- a/tb_rest_client/models/models_ce/rule_chain_id.py +++ b/tb_rest_client/models/models_ce/rule_chain_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 RuleChainId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -32,70 +28,36 @@ class RuleChainId(object): and the value is json key in definition. """ swagger_types = { - 'entity_type': 'str', 'id': 'str' } attribute_map = { - 'entity_type': 'entityType', 'id': 'id' } - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None + def __init__(self, id=None): # noqa: E501 + """RuleChainId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type if id is not None: self.id = id - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 + """Gets the id of this RuleChainId. # noqa: E501 - :return: The id of this EntityId. # noqa: E501 + :return: The id of this RuleChainId. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this EntityId. + """Sets the id of this RuleChainId. - :param id: The id of this EntityId. # noqa: E501 + :param id: The id of this RuleChainId. # noqa: E501 :type: str """ @@ -122,7 +84,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(self.__class__, dict): + if issubclass(RuleChainId, dict): for key, value in self.items(): result[key] = value @@ -138,7 +100,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): + if not isinstance(other, RuleChainId): return False return self.__dict__ == other.__dict__ 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 98ca8f25..66091464 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 RuleChainMetaData(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 @@ -49,14 +45,12 @@ class RuleChainMetaData(object): def __init__(self, connections=None, first_node_index=None, nodes=None, rule_chain_connections=None, rule_chain_id=None): # noqa: E501 """RuleChainMetaData - a model defined in Swagger""" # noqa: E501 - self._connections = None self._first_node_index = None self._nodes = None self._rule_chain_connections = None self._rule_chain_id = None self.discriminator = None - if connections is not None: self.connections = connections if first_node_index is not None: diff --git a/tb_rest_client/models/models_ce/rule_node.py b/tb_rest_client/models/models_ce/rule_node.py index 216a3234..1b670865 100644 --- a/tb_rest_client/models/models_ce/rule_node.py +++ b/tb_rest_client/models/models_ce/rule_node.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 RuleNode(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -55,7 +51,6 @@ class RuleNode(object): def __init__(self, additional_info=None, configuration=None, created_time=None, debug_mode=None, id=None, name=None, rule_chain_id=None, type=None): # noqa: E501 """RuleNode - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._configuration = None self._created_time = None @@ -65,7 +60,6 @@ def __init__(self, additional_info=None, configuration=None, created_time=None, self._rule_chain_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if configuration is not None: 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 f34aaba8..627ef0e8 100644 --- a/tb_rest_client/models/models_ce/rule_node_id.py +++ b/tb_rest_client/models/models_ce/rule_node_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 RuleNodeId(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 @@ -32,70 +28,36 @@ class RuleNodeId(object): and the value is json key in definition. """ swagger_types = { - 'entity_type': 'str', 'id': 'str' } attribute_map = { - 'entity_type': 'entityType', 'id': 'id' } - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None + def __init__(self, id=None): # noqa: E501 + """RuleNodeId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type if id is not None: self.id = id - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 + """Gets the id of this RuleNodeId. # noqa: E501 - :return: The id of this EntityId. # noqa: E501 + :return: The id of this RuleNodeId. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this EntityId. + """Sets the id of this RuleNodeId. - :param id: The id of this EntityId. # noqa: E501 + :param id: The id of this RuleNodeId. # noqa: E501 :type: str """ @@ -122,7 +84,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(self.__class__, dict): + if issubclass(RuleNodeId, dict): for key, value in self.items(): result[key] = value @@ -138,7 +100,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): + if not isinstance(other, RuleNodeId): return False return self.__dict__ == other.__dict__ 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 new file mode 100644 index 00000000..26f136be --- /dev/null +++ b/tb_rest_client/models/models_ce/save_ota_package_info_request.py @@ -0,0 +1,538 @@ +# 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 SaveOtaPackageInfoRequest(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': 'str', + 'checksum': 'str', + 'checksum_algorithm': 'str', + 'content_type': 'str', + 'created_time': 'int', + 'data_size': 'int', + 'device_profile_id': 'DeviceProfileId', + 'file_name': 'str', + 'has_data': 'bool', + 'id': 'OtaPackageId', + 'tag': 'str', + 'tenant_id': 'TenantId', + 'title': 'str', + 'type': 'str', + 'url': 'str', + 'uses_url': 'bool', + 'version': 'str' + } + + attribute_map = { + 'additional_info': 'additionalInfo', + 'checksum': 'checksum', + 'checksum_algorithm': 'checksumAlgorithm', + 'content_type': 'contentType', + 'created_time': 'createdTime', + 'data_size': 'dataSize', + 'device_profile_id': 'deviceProfileId', + 'file_name': 'fileName', + 'has_data': 'hasData', + 'id': 'id', + 'tag': 'tag', + 'tenant_id': 'tenantId', + 'title': 'title', + 'type': 'type', + 'url': 'url', + 'uses_url': 'usesUrl', + 'version': 'version' + } + + def __init__(self, additional_info=None, checksum=None, checksum_algorithm=None, content_type=None, created_time=None, data_size=None, device_profile_id=None, file_name=None, has_data=None, id=None, tag=None, tenant_id=None, title=None, type=None, url=None, uses_url=None, version=None): # noqa: E501 + """SaveOtaPackageInfoRequest - a model defined in Swagger""" # noqa: E501 + self._additional_info = None + self._checksum = None + self._checksum_algorithm = None + self._content_type = None + self._created_time = None + self._data_size = None + self._device_profile_id = None + self._file_name = None + self._has_data = None + self._id = None + self._tag = None + self._tenant_id = None + self._title = None + self._type = None + self._url = None + self._uses_url = None + self._version = None + self.discriminator = None + if additional_info is not None: + self.additional_info = additional_info + if checksum is not None: + self.checksum = checksum + if checksum_algorithm is not None: + self.checksum_algorithm = checksum_algorithm + if content_type is not None: + self.content_type = content_type + if created_time is not None: + self.created_time = created_time + if data_size is not None: + self.data_size = data_size + if device_profile_id is not None: + self.device_profile_id = device_profile_id + if file_name is not None: + self.file_name = file_name + if has_data is not None: + self.has_data = has_data + if id is not None: + self.id = id + if tag is not None: + self.tag = tag + if tenant_id is not None: + self.tenant_id = tenant_id + if title is not None: + self.title = title + if type is not None: + self.type = type + if url is not None: + self.url = url + if uses_url is not None: + self.uses_url = uses_url + if version is not None: + self.version = version + + @property + def additional_info(self): + """Gets the additional_info of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The additional_info of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: str + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this SaveOtaPackageInfoRequest. + + + :param additional_info: The additional_info of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: str + """ + + self._additional_info = additional_info + + @property + def checksum(self): + """Gets the checksum of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The checksum of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: str + """ + return self._checksum + + @checksum.setter + def checksum(self, checksum): + """Sets the checksum of this SaveOtaPackageInfoRequest. + + + :param checksum: The checksum of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: str + """ + + self._checksum = checksum + + @property + def checksum_algorithm(self): + """Gets the checksum_algorithm of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The checksum_algorithm of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: str + """ + return self._checksum_algorithm + + @checksum_algorithm.setter + def checksum_algorithm(self, checksum_algorithm): + """Sets the checksum_algorithm of this SaveOtaPackageInfoRequest. + + + :param checksum_algorithm: The checksum_algorithm of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: str + """ + allowed_values = ["MD5", "SHA256", "SHA384", "SHA512", "CRC32", "MURMUR3_32", "MURMUR3_128"] # noqa: E501 + if checksum_algorithm not in allowed_values: + raise ValueError( + "Invalid value for `checksum_algorithm` ({0}), must be one of {1}" # noqa: E501 + .format(checksum_algorithm, allowed_values) + ) + + self._checksum_algorithm = checksum_algorithm + + @property + def content_type(self): + """Gets the content_type of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The content_type of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """Sets the content_type of this SaveOtaPackageInfoRequest. + + + :param content_type: The content_type of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: str + """ + + self._content_type = content_type + + @property + def created_time(self): + """Gets the created_time of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The created_time of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this SaveOtaPackageInfoRequest. + + + :param created_time: The created_time of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def data_size(self): + """Gets the data_size of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The data_size of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: int + """ + return self._data_size + + @data_size.setter + def data_size(self, data_size): + """Sets the data_size of this SaveOtaPackageInfoRequest. + + + :param data_size: The data_size of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: int + """ + + self._data_size = data_size + + @property + def device_profile_id(self): + """Gets the device_profile_id of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The device_profile_id of this SaveOtaPackageInfoRequest. # 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 SaveOtaPackageInfoRequest. + + + :param device_profile_id: The device_profile_id of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: DeviceProfileId + """ + + self._device_profile_id = device_profile_id + + @property + def file_name(self): + """Gets the file_name of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The file_name of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: str + """ + return self._file_name + + @file_name.setter + def file_name(self, file_name): + """Sets the file_name of this SaveOtaPackageInfoRequest. + + + :param file_name: The file_name of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: str + """ + + self._file_name = file_name + + @property + def has_data(self): + """Gets the has_data of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The has_data of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: bool + """ + return self._has_data + + @has_data.setter + def has_data(self, has_data): + """Sets the has_data of this SaveOtaPackageInfoRequest. + + + :param has_data: The has_data of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: bool + """ + + self._has_data = has_data + + @property + def id(self): + """Gets the id of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The id of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: OtaPackageId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SaveOtaPackageInfoRequest. + + + :param id: The id of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: OtaPackageId + """ + + self._id = id + + @property + def tag(self): + """Gets the tag of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The tag of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this SaveOtaPackageInfoRequest. + + + :param tag: The tag of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: str + """ + + self._tag = tag + + @property + def tenant_id(self): + """Gets the tenant_id of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The tenant_id of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this SaveOtaPackageInfoRequest. + + + :param tenant_id: The tenant_id of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def title(self): + """Gets the title of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The title of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this SaveOtaPackageInfoRequest. + + + :param title: The title of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def type(self): + """Gets the type of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The type of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this SaveOtaPackageInfoRequest. + + + :param type: The type of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: str + """ + allowed_values = ["FIRMWARE", "SOFTWARE"] # 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 url(self): + """Gets the url of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The url of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this SaveOtaPackageInfoRequest. + + + :param url: The url of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: str + """ + + self._url = url + + @property + def uses_url(self): + """Gets the uses_url of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The uses_url of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: bool + """ + return self._uses_url + + @uses_url.setter + def uses_url(self, uses_url): + """Sets the uses_url of this SaveOtaPackageInfoRequest. + + + :param uses_url: The uses_url of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: bool + """ + + self._uses_url = uses_url + + @property + def version(self): + """Gets the version of this SaveOtaPackageInfoRequest. # noqa: E501 + + + :return: The version of this SaveOtaPackageInfoRequest. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this SaveOtaPackageInfoRequest. + + + :param version: The version of this SaveOtaPackageInfoRequest. # noqa: E501 + :type: str + """ + + self._version = version + + 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(SaveOtaPackageInfoRequest, 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, SaveOtaPackageInfoRequest): + 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/security_settings.py b/tb_rest_client/models/models_ce/security_settings.py index fc15f3f0..623feb59 100644 --- a/tb_rest_client/models/models_ce/security_settings.py +++ b/tb_rest_client/models/models_ce/security_settings.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 SecuritySettings(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -45,12 +41,10 @@ class SecuritySettings(object): def __init__(self, max_failed_login_attempts=None, password_policy=None, user_lockout_notification_email=None): # noqa: E501 """SecuritySettings - a model defined in Swagger""" # noqa: E501 - self._max_failed_login_attempts = None self._password_policy = None self._user_lockout_notification_email = None self.discriminator = None - if max_failed_login_attempts is not None: self.max_failed_login_attempts = max_failed_login_attempts if password_policy is not None: diff --git a/tb_rest_client/models/models_ce/server_security_config.py b/tb_rest_client/models/models_ce/server_security_config.py new file mode 100644 index 00000000..062935b0 --- /dev/null +++ b/tb_rest_client/models/models_ce/server_security_config.py @@ -0,0 +1,318 @@ +# 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 ServerSecurityConfig(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 = { + 'bootstrap_server_account_timeout': 'int', + 'bootstrap_server_is': 'bool', + 'client_hold_off_time': 'int', + 'host': 'str', + 'port': 'int', + 'security_host': 'str', + 'security_port': 'int', + 'server_id': 'int', + 'server_public_key': 'str' + } + + attribute_map = { + 'bootstrap_server_account_timeout': 'bootstrapServerAccountTimeout', + 'bootstrap_server_is': 'bootstrapServerIs', + 'client_hold_off_time': 'clientHoldOffTime', + 'host': 'host', + 'port': 'port', + 'security_host': 'securityHost', + 'security_port': 'securityPort', + 'server_id': 'serverId', + 'server_public_key': 'serverPublicKey' + } + + def __init__(self, bootstrap_server_account_timeout=None, bootstrap_server_is=None, client_hold_off_time=None, host=None, port=None, security_host=None, security_port=None, server_id=None, server_public_key=None): # noqa: E501 + """ServerSecurityConfig - a model defined in Swagger""" # noqa: E501 + self._bootstrap_server_account_timeout = None + self._bootstrap_server_is = None + self._client_hold_off_time = None + self._host = None + self._port = None + self._security_host = None + self._security_port = None + self._server_id = None + self._server_public_key = None + self.discriminator = None + if bootstrap_server_account_timeout is not None: + self.bootstrap_server_account_timeout = bootstrap_server_account_timeout + if bootstrap_server_is is not None: + self.bootstrap_server_is = bootstrap_server_is + if client_hold_off_time is not None: + self.client_hold_off_time = client_hold_off_time + if host is not None: + self.host = host + if port is not None: + self.port = port + if security_host is not None: + self.security_host = security_host + if security_port is not None: + self.security_port = security_port + if server_id is not None: + self.server_id = server_id + if server_public_key is not None: + self.server_public_key = server_public_key + + @property + def bootstrap_server_account_timeout(self): + """Gets the bootstrap_server_account_timeout of this ServerSecurityConfig. # noqa: E501 + + + :return: The bootstrap_server_account_timeout of this ServerSecurityConfig. # 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 ServerSecurityConfig. + + + :param bootstrap_server_account_timeout: The bootstrap_server_account_timeout of this ServerSecurityConfig. # noqa: E501 + :type: int + """ + + self._bootstrap_server_account_timeout = bootstrap_server_account_timeout + + @property + def bootstrap_server_is(self): + """Gets the bootstrap_server_is of this ServerSecurityConfig. # noqa: E501 + + + :return: The bootstrap_server_is of this ServerSecurityConfig. # 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 ServerSecurityConfig. + + + :param bootstrap_server_is: The bootstrap_server_is of this ServerSecurityConfig. # noqa: E501 + :type: bool + """ + + self._bootstrap_server_is = bootstrap_server_is + + @property + def client_hold_off_time(self): + """Gets the client_hold_off_time of this ServerSecurityConfig. # noqa: E501 + + + :return: The client_hold_off_time of this ServerSecurityConfig. # 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 ServerSecurityConfig. + + + :param client_hold_off_time: The client_hold_off_time of this ServerSecurityConfig. # noqa: E501 + :type: int + """ + + self._client_hold_off_time = client_hold_off_time + + @property + def host(self): + """Gets the host of this ServerSecurityConfig. # noqa: E501 + + + :return: The host of this ServerSecurityConfig. # noqa: E501 + :rtype: str + """ + return self._host + + @host.setter + def host(self, host): + """Sets the host of this ServerSecurityConfig. + + + :param host: The host of this ServerSecurityConfig. # noqa: E501 + :type: str + """ + + self._host = host + + @property + def port(self): + """Gets the port of this ServerSecurityConfig. # noqa: E501 + + + :return: The port of this ServerSecurityConfig. # noqa: E501 + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this ServerSecurityConfig. + + + :param port: The port of this ServerSecurityConfig. # noqa: E501 + :type: int + """ + + self._port = port + + @property + def security_host(self): + """Gets the security_host of this ServerSecurityConfig. # noqa: E501 + + + :return: The security_host of this ServerSecurityConfig. # noqa: E501 + :rtype: str + """ + return self._security_host + + @security_host.setter + def security_host(self, security_host): + """Sets the security_host of this ServerSecurityConfig. + + + :param security_host: The security_host of this ServerSecurityConfig. # noqa: E501 + :type: str + """ + + self._security_host = security_host + + @property + def security_port(self): + """Gets the security_port of this ServerSecurityConfig. # noqa: E501 + + + :return: The security_port of this ServerSecurityConfig. # noqa: E501 + :rtype: int + """ + return self._security_port + + @security_port.setter + def security_port(self, security_port): + """Sets the security_port of this ServerSecurityConfig. + + + :param security_port: The security_port of this ServerSecurityConfig. # noqa: E501 + :type: int + """ + + self._security_port = security_port + + @property + def server_id(self): + """Gets the server_id of this ServerSecurityConfig. # noqa: E501 + + + :return: The server_id of this ServerSecurityConfig. # noqa: E501 + :rtype: int + """ + return self._server_id + + @server_id.setter + def server_id(self, server_id): + """Sets the server_id of this ServerSecurityConfig. + + + :param server_id: The server_id of this ServerSecurityConfig. # noqa: E501 + :type: int + """ + + self._server_id = server_id + + @property + def server_public_key(self): + """Gets the server_public_key of this ServerSecurityConfig. # noqa: E501 + + + :return: The server_public_key of this ServerSecurityConfig. # 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 ServerSecurityConfig. + + + :param server_public_key: The server_public_key of this ServerSecurityConfig. # noqa: E501 + :type: str + """ + + self._server_public_key = server_public_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(ServerSecurityConfig, 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, ServerSecurityConfig): + 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/short_customer_info.py b/tb_rest_client/models/models_ce/short_customer_info.py index 2d6f6469..049ff012 100644 --- a/tb_rest_client/models/models_ce/short_customer_info.py +++ b/tb_rest_client/models/models_ce/short_customer_info.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 ShortCustomerInfo(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 @@ -47,13 +43,11 @@ class ShortCustomerInfo(object): def __init__(self, customer_id=None, public=None, title=None, is_public=None): # noqa: E501 """ShortCustomerInfo - a model defined in Swagger""" # noqa: E501 - self._customer_id = None self._public = None self._title = None self._is_public = None self.discriminator = None - if customer_id is not None: self.customer_id = customer_id if public is not None: diff --git a/tb_rest_client/models/models_ce/sign_up_request.py b/tb_rest_client/models/models_ce/sign_up_request.py new file mode 100644 index 00000000..f3cd5e23 --- /dev/null +++ b/tb_rest_client/models/models_ce/sign_up_request.py @@ -0,0 +1,214 @@ +# 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 SignUpRequest(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', + 'last_name': 'str', + 'password': 'str', + 'recaptcha_response': 'str' + } + + attribute_map = { + 'email': 'email', + 'first_name': 'firstName', + 'last_name': 'lastName', + 'password': 'password', + 'recaptcha_response': 'recaptchaResponse' + } + + def __init__(self, email=None, first_name=None, last_name=None, password=None, recaptcha_response=None): # noqa: E501 + """SignUpRequest - a model defined in Swagger""" # noqa: E501 + self._email = None + self._first_name = None + self._last_name = None + self._password = None + self._recaptcha_response = None + self.discriminator = None + 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 + if password is not None: + self.password = password + if recaptcha_response is not None: + self.recaptcha_response = recaptcha_response + + @property + def email(self): + """Gets the email of this SignUpRequest. # noqa: E501 + + + :return: The email of this SignUpRequest. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this SignUpRequest. + + + :param email: The email of this SignUpRequest. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def first_name(self): + """Gets the first_name of this SignUpRequest. # noqa: E501 + + + :return: The first_name of this SignUpRequest. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this SignUpRequest. + + + :param first_name: The first_name of this SignUpRequest. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this SignUpRequest. # noqa: E501 + + + :return: The last_name of this SignUpRequest. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this SignUpRequest. + + + :param last_name: The last_name of this SignUpRequest. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + @property + def password(self): + """Gets the password of this SignUpRequest. # noqa: E501 + + + :return: The password of this SignUpRequest. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this SignUpRequest. + + + :param password: The password of this SignUpRequest. # noqa: E501 + :type: str + """ + + self._password = password + + @property + def recaptcha_response(self): + """Gets the recaptcha_response of this SignUpRequest. # noqa: E501 + + + :return: The recaptcha_response of this SignUpRequest. # noqa: E501 + :rtype: str + """ + return self._recaptcha_response + + @recaptcha_response.setter + def recaptcha_response(self, recaptcha_response): + """Sets the recaptcha_response of this SignUpRequest. + + + :param recaptcha_response: The recaptcha_response of this SignUpRequest. # noqa: E501 + :type: str + """ + + self._recaptcha_response = recaptcha_response + + 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(SignUpRequest, 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, SignUpRequest): + 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 new file mode 100644 index 00000000..7974cb2b --- /dev/null +++ b/tb_rest_client/models/models_ce/sms_provider_configuration.py @@ -0,0 +1,84 @@ +# 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 SmsProviderConfiguration(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 + """SmsProviderConfiguration - 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(SmsProviderConfiguration, 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, SmsProviderConfiguration): + 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 4f34fd72..74d50254 100644 --- a/tb_rest_client/models/models_ce/tb_resource.py +++ b/tb_rest_client/models/models_ce/tb_resource.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class TbResource(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 @@ -52,12 +49,8 @@ class TbResource(object): 'title': 'title' } - def __init__(self, created_time=None, data=None, file_name=None, id=None, resource_key=None, resource_type=None, tenant_id=None, title=None, _configuration=None): # noqa: E501 + def __init__(self, created_time=None, data=None, file_name=None, id=None, resource_key=None, resource_type=None, tenant_id=None, title=None): # noqa: E501 """TbResource - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._created_time = None self._data = None self._file_name = None @@ -67,7 +60,6 @@ def __init__(self, created_time=None, data=None, file_name=None, id=None, resour self._tenant_id = None self._title = None self.discriminator = None - if created_time is not None: self.created_time = created_time if data is not None: @@ -209,8 +201,7 @@ def resource_type(self, resource_type): :type: str """ allowed_values = ["LWM2M_MODEL", "JKS", "PKCS_12"] # noqa: E501 - if (self._configuration.client_side_validation and - resource_type not in allowed_values): + if resource_type not in allowed_values: raise ValueError( "Invalid value for `resource_type` ({0}), must be one of {1}" # noqa: E501 .format(resource_type, allowed_values) @@ -300,11 +291,8 @@ def __eq__(self, other): if not isinstance(other, TbResource): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, TbResource): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 957cc254..f2aa75ea 100644 --- a/tb_rest_client/models/models_ce/tb_resource_id.py +++ b/tb_rest_client/models/models_ce/tb_resource_id.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class TbResourceId(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 @@ -38,15 +35,10 @@ class TbResourceId(object): 'id': 'id' } - def __init__(self, id=None, _configuration=None): # noqa: E501 + def __init__(self, id=None): # noqa: E501 """TbResourceId - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._id = None self.discriminator = None - if id is not None: self.id = id @@ -111,11 +103,8 @@ def __eq__(self, other): if not isinstance(other, TbResourceId): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, TbResourceId): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 763ec331..75829a17 100644 --- a/tb_rest_client/models/models_ce/tb_resource_info.py +++ b/tb_rest_client/models/models_ce/tb_resource_info.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class TbResourceInfo(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 @@ -48,12 +45,8 @@ class TbResourceInfo(object): 'title': 'title' } - def __init__(self, created_time=None, id=None, resource_key=None, resource_type=None, tenant_id=None, title=None, _configuration=None): # noqa: E501 + def __init__(self, created_time=None, id=None, resource_key=None, resource_type=None, tenant_id=None, title=None): # noqa: E501 """TbResourceInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._created_time = None self._id = None self._resource_key = None @@ -61,7 +54,6 @@ def __init__(self, created_time=None, id=None, resource_key=None, resource_type= self._tenant_id = None self._title = None self.discriminator = None - if created_time is not None: self.created_time = created_time if id is not None: @@ -157,8 +149,7 @@ def resource_type(self, resource_type): :type: str """ allowed_values = ["LWM2M_MODEL", "JKS", "PKCS_12"] # noqa: E501 - if (self._configuration.client_side_validation and - resource_type not in allowed_values): + if resource_type not in allowed_values: raise ValueError( "Invalid value for `resource_type` ({0}), must be one of {1}" # noqa: E501 .format(resource_type, allowed_values) @@ -248,11 +239,8 @@ def __eq__(self, other): if not isinstance(other, TbResourceInfo): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, TbResourceInfo): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 287961e9..f3802f38 100644 --- a/tb_rest_client/models/models_ce/telemetry_entity_view.py +++ b/tb_rest_client/models/models_ce/telemetry_entity_view.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 TelemetryEntityView(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 @@ -43,11 +39,9 @@ class TelemetryEntityView(object): def __init__(self, attributes=None, timeseries=None): # noqa: E501 """TelemetryEntityView - a model defined in Swagger""" # noqa: E501 - self._attributes = None self._timeseries = None self.discriminator = None - if attributes is not None: self.attributes = attributes if timeseries is not None: diff --git a/tb_rest_client/models/models_ce/tenant.py b/tb_rest_client/models/models_ce/tenant.py index 924ec403..f8d234c7 100644 --- a/tb_rest_client/models/models_ce/tenant.py +++ b/tb_rest_client/models/models_ce/tenant.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Tenant(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 @@ -40,12 +36,11 @@ class Tenant(object): 'created_time': 'int', 'email': 'str', 'id': 'TenantId', - 'isolated_tb_core': 'bool', - 'isolated_tb_rule_engine': 'bool', 'name': 'str', 'phone': 'str', 'region': 'str', 'state': 'str', + 'tenant_profile_id': 'TenantProfileId', 'title': 'str', 'zip': 'str' } @@ -59,19 +54,17 @@ class Tenant(object): 'created_time': 'createdTime', 'email': 'email', 'id': 'id', - 'isolated_tb_core': 'isolatedTbCore', - 'isolated_tb_rule_engine': 'isolatedTbRuleEngine', 'name': 'name', 'phone': 'phone', 'region': 'region', 'state': 'state', + 'tenant_profile_id': 'tenantProfileId', 'title': 'title', 'zip': 'zip' } - def __init__(self, additional_info=None, address=None, address2=None, city=None, country=None, created_time=None, email=None, id=None, isolated_tb_core=None, isolated_tb_rule_engine=None, name=None, phone=None, region=None, state=None, title=None, zip=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, region=None, state=None, tenant_profile_id=None, title=None, zip=None): # noqa: E501 """Tenant - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._address = None self._address2 = None @@ -80,16 +73,14 @@ def __init__(self, additional_info=None, address=None, address2=None, city=None, self._created_time = None self._email = None self._id = None - self._isolated_tb_core = None - self._isolated_tb_rule_engine = None self._name = None self._phone = None self._region = None self._state = None + self._tenant_profile_id = None self._title = None self._zip = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if address is not None: @@ -106,10 +97,6 @@ def __init__(self, additional_info=None, address=None, address2=None, city=None, self.email = email if id is not None: self.id = id - 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 name is not None: self.name = name if phone is not None: @@ -118,6 +105,8 @@ def __init__(self, additional_info=None, address=None, address2=None, city=None, self.region = region if state is not None: self.state = state + if tenant_profile_id is not None: + self.tenant_profile_id = tenant_profile_id if title is not None: self.title = title if zip is not None: @@ -291,48 +280,6 @@ def id(self, id): self._id = id - @property - def isolated_tb_core(self): - """Gets the isolated_tb_core of this Tenant. # noqa: E501 - - - :return: The isolated_tb_core of this Tenant. # 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 Tenant. - - - :param isolated_tb_core: The isolated_tb_core of this Tenant. # 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 Tenant. # noqa: E501 - - - :return: The isolated_tb_rule_engine of this Tenant. # noqa: E501 - :rtype: bool - """ - return self._isolated_tb_rule_engine - - @isolated_tb_rule_engine.setter - def isolated_tb_rule_engine(self, isolated_tb_rule_engine): - """Sets the isolated_tb_rule_engine of this Tenant. - - - :param isolated_tb_rule_engine: The isolated_tb_rule_engine of this Tenant. # noqa: E501 - :type: bool - """ - - self._isolated_tb_rule_engine = isolated_tb_rule_engine - @property def name(self): """Gets the name of this Tenant. # noqa: E501 @@ -417,6 +364,27 @@ def state(self, state): self._state = state + @property + def tenant_profile_id(self): + """Gets the tenant_profile_id of this Tenant. # noqa: E501 + + + :return: The tenant_profile_id of this Tenant. # noqa: E501 + :rtype: TenantProfileId + """ + return self._tenant_profile_id + + @tenant_profile_id.setter + def tenant_profile_id(self, tenant_profile_id): + """Sets the tenant_profile_id of this Tenant. + + + :param tenant_profile_id: The tenant_profile_id of this Tenant. # noqa: E501 + :type: TenantProfileId + """ + + self._tenant_profile_id = tenant_profile_id + @property def title(self): """Gets the title of this Tenant. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/tenant_id.py b/tb_rest_client/models/models_ce/tenant_id.py index 6a635578..253e720c 100644 --- a/tb_rest_client/models/models_ce/tenant_id.py +++ b/tb_rest_client/models/models_ce/tenant_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 TenantId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -32,70 +28,36 @@ class TenantId(object): and the value is json key in definition. """ swagger_types = { - 'entity_type': 'str', 'id': 'str' } attribute_map = { - 'entity_type': 'entityType', 'id': 'id' } - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None + def __init__(self, id=None): # noqa: E501 + """TenantId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type if id is not None: self.id = id - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 + """Gets the id of this TenantId. # noqa: E501 - :return: The id of this EntityId. # noqa: E501 + :return: The id of this TenantId. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this EntityId. + """Sets the id of this TenantId. - :param id: The id of this EntityId. # noqa: E501 + :param id: The id of this TenantId. # noqa: E501 :type: str """ @@ -122,7 +84,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(self.__class__, dict): + if issubclass(TenantId, dict): for key, value in self.items(): result[key] = value @@ -138,7 +100,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): + if not isinstance(other, TenantId): return False return self.__dict__ == other.__dict__ diff --git a/tb_rest_client/models/models_ce/tenant_info.py b/tb_rest_client/models/models_ce/tenant_info.py new file mode 100644 index 00000000..ebcfbf68 --- /dev/null +++ b/tb_rest_client/models/models_ce/tenant_info.py @@ -0,0 +1,500 @@ +# 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 TenantInfo(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': 'str', + 'address': 'str', + 'address2': 'str', + 'city': 'str', + 'country': 'str', + 'created_time': 'int', + 'email': 'str', + 'id': 'TenantId', + 'name': 'str', + 'phone': 'str', + 'region': 'str', + 'state': 'str', + 'tenant_profile_id': 'TenantProfileId', + 'tenant_profile_name': 'str', + 'title': 'str', + 'zip': 'str' + } + + attribute_map = { + 'additional_info': 'additionalInfo', + 'address': 'address', + 'address2': 'address2', + 'city': 'city', + 'country': 'country', + 'created_time': 'createdTime', + 'email': 'email', + 'id': 'id', + 'name': 'name', + 'phone': 'phone', + 'region': 'region', + 'state': 'state', + 'tenant_profile_id': 'tenantProfileId', + 'tenant_profile_name': 'tenantProfileName', + 'title': 'title', + '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, region=None, state=None, tenant_profile_id=None, tenant_profile_name=None, title=None, zip=None): # noqa: E501 + """TenantInfo - a model defined in Swagger""" # noqa: E501 + self._additional_info = None + self._address = None + self._address2 = None + self._city = None + self._country = None + self._created_time = None + self._email = None + self._id = None + self._name = None + self._phone = None + self._region = None + self._state = None + self._tenant_profile_id = None + self._tenant_profile_name = None + self._title = None + self._zip = None + self.discriminator = None + if additional_info is not None: + self.additional_info = additional_info + if address is not None: + self.address = address + if address2 is not None: + self.address2 = address2 + if city is not None: + self.city = city + if country is not None: + self.country = country + if created_time is not None: + self.created_time = created_time + 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 phone is not None: + self.phone = phone + if region is not None: + self.region = region + if state is not None: + self.state = state + if tenant_profile_id is not None: + self.tenant_profile_id = tenant_profile_id + if tenant_profile_name is not None: + self.tenant_profile_name = tenant_profile_name + if title is not None: + self.title = title + if zip is not None: + self.zip = zip + + @property + def additional_info(self): + """Gets the additional_info of this TenantInfo. # noqa: E501 + + + :return: The additional_info of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this TenantInfo. + + + :param additional_info: The additional_info of this TenantInfo. # noqa: E501 + :type: str + """ + + self._additional_info = additional_info + + @property + def address(self): + """Gets the address of this TenantInfo. # noqa: E501 + + + :return: The address of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this TenantInfo. + + + :param address: The address of this TenantInfo. # noqa: E501 + :type: str + """ + + self._address = address + + @property + def address2(self): + """Gets the address2 of this TenantInfo. # noqa: E501 + + + :return: The address2 of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._address2 + + @address2.setter + def address2(self, address2): + """Sets the address2 of this TenantInfo. + + + :param address2: The address2 of this TenantInfo. # noqa: E501 + :type: str + """ + + self._address2 = address2 + + @property + def city(self): + """Gets the city of this TenantInfo. # noqa: E501 + + + :return: The city of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._city + + @city.setter + def city(self, city): + """Sets the city of this TenantInfo. + + + :param city: The city of this TenantInfo. # noqa: E501 + :type: str + """ + + self._city = city + + @property + def country(self): + """Gets the country of this TenantInfo. # noqa: E501 + + + :return: The country of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._country + + @country.setter + def country(self, country): + """Sets the country of this TenantInfo. + + + :param country: The country of this TenantInfo. # noqa: E501 + :type: str + """ + + self._country = country + + @property + def created_time(self): + """Gets the created_time of this TenantInfo. # noqa: E501 + + + :return: The created_time of this TenantInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this TenantInfo. + + + :param created_time: The created_time of this TenantInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def email(self): + """Gets the email of this TenantInfo. # noqa: E501 + + + :return: The email of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this TenantInfo. + + + :param email: The email of this TenantInfo. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def id(self): + """Gets the id of this TenantInfo. # noqa: E501 + + + :return: The id of this TenantInfo. # noqa: E501 + :rtype: TenantId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TenantInfo. + + + :param id: The id of this TenantInfo. # noqa: E501 + :type: TenantId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this TenantInfo. # noqa: E501 + + + :return: The name of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this TenantInfo. + + + :param name: The name of this TenantInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def phone(self): + """Gets the phone of this TenantInfo. # noqa: E501 + + + :return: The phone of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._phone + + @phone.setter + def phone(self, phone): + """Sets the phone of this TenantInfo. + + + :param phone: The phone of this TenantInfo. # noqa: E501 + :type: str + """ + + self._phone = phone + + @property + def region(self): + """Gets the region of this TenantInfo. # noqa: E501 + + + :return: The region of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._region + + @region.setter + def region(self, region): + """Sets the region of this TenantInfo. + + + :param region: The region of this TenantInfo. # noqa: E501 + :type: str + """ + + self._region = region + + @property + def state(self): + """Gets the state of this TenantInfo. # noqa: E501 + + + :return: The state of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this TenantInfo. + + + :param state: The state of this TenantInfo. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def tenant_profile_id(self): + """Gets the tenant_profile_id of this TenantInfo. # noqa: E501 + + + :return: The tenant_profile_id of this TenantInfo. # noqa: E501 + :rtype: TenantProfileId + """ + return self._tenant_profile_id + + @tenant_profile_id.setter + def tenant_profile_id(self, tenant_profile_id): + """Sets the tenant_profile_id of this TenantInfo. + + + :param tenant_profile_id: The tenant_profile_id of this TenantInfo. # noqa: E501 + :type: TenantProfileId + """ + + self._tenant_profile_id = tenant_profile_id + + @property + def tenant_profile_name(self): + """Gets the tenant_profile_name of this TenantInfo. # noqa: E501 + + + :return: The tenant_profile_name of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._tenant_profile_name + + @tenant_profile_name.setter + def tenant_profile_name(self, tenant_profile_name): + """Sets the tenant_profile_name of this TenantInfo. + + + :param tenant_profile_name: The tenant_profile_name of this TenantInfo. # noqa: E501 + :type: str + """ + + self._tenant_profile_name = tenant_profile_name + + @property + def title(self): + """Gets the title of this TenantInfo. # noqa: E501 + + + :return: The title of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this TenantInfo. + + + :param title: The title of this TenantInfo. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def zip(self): + """Gets the zip of this TenantInfo. # noqa: E501 + + + :return: The zip of this TenantInfo. # noqa: E501 + :rtype: str + """ + return self._zip + + @zip.setter + def zip(self, zip): + """Sets the zip of this TenantInfo. + + + :param zip: The zip of this TenantInfo. # noqa: E501 + :type: str + """ + + self._zip = zip + + 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(TenantInfo, 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, TenantInfo): + 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_profile.py b/tb_rest_client/models/models_ce/tenant_profile.py index 290e7ece..b78c64e9 100644 --- a/tb_rest_client/models/models_ce/tenant_profile.py +++ b/tb_rest_client/models/models_ce/tenant_profile.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class TenantProfile(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 @@ -52,12 +49,8 @@ class TenantProfile(object): 'profile_data': 'profileData' } - def __init__(self, created_time=None, default=None, description=None, id=None, isolated_tb_core=None, isolated_tb_rule_engine=None, name=None, profile_data=None, _configuration=None): # noqa: E501 + def __init__(self, created_time=None, default=None, description=None, id=None, isolated_tb_core=None, isolated_tb_rule_engine=None, name=None, profile_data=None): # noqa: E501 """TenantProfile - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._created_time = None self._default = None self._description = None @@ -67,7 +60,6 @@ def __init__(self, created_time=None, default=None, description=None, id=None, i self._name = None self._profile_data = None self.discriminator = None - if created_time is not None: self.created_time = created_time if default is not None: @@ -293,11 +285,8 @@ def __eq__(self, other): if not isinstance(other, TenantProfile): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, TenantProfile): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 9f6d6065..05b59e35 100644 --- a/tb_rest_client/models/models_ce/tenant_profile_configuration.py +++ b/tb_rest_client/models/models_ce/tenant_profile_configuration.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class TenantProfileConfiguration(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 @@ -36,11 +33,8 @@ class TenantProfileConfiguration(object): attribute_map = { } - def __init__(self, _configuration=None): # noqa: E501 + def __init__(self): # noqa: E501 """TenantProfileConfiguration - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration self.discriminator = None def to_dict(self): @@ -83,11 +77,8 @@ def __eq__(self, other): if not isinstance(other, TenantProfileConfiguration): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, TenantProfileConfiguration): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 d9ba033e..880c7587 100644 --- a/tb_rest_client/models/models_ce/tenant_profile_data.py +++ b/tb_rest_client/models/models_ce/tenant_profile_data.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class TenantProfileData(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 @@ -38,15 +35,10 @@ class TenantProfileData(object): 'configuration': 'configuration' } - def __init__(self, configuration=None, _configuration=None): # noqa: E501 + def __init__(self, configuration=None): # noqa: E501 """TenantProfileData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._configuration = None self.discriminator = None - if configuration is not None: self.configuration = configuration @@ -111,11 +103,8 @@ def __eq__(self, other): if not isinstance(other, TenantProfileData): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, TenantProfileData): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 148c86a1..8dfcf838 100644 --- a/tb_rest_client/models/models_ce/tenant_profile_id.py +++ b/tb_rest_client/models/models_ce/tenant_profile_id.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class TenantProfileId(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 @@ -38,15 +35,10 @@ class TenantProfileId(object): 'id': 'id' } - def __init__(self, id=None, _configuration=None): # noqa: E501 + def __init__(self, id=None): # noqa: E501 """TenantProfileId - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._id = None self.discriminator = None - if id is not None: self.id = id @@ -111,11 +103,8 @@ def __eq__(self, other): if not isinstance(other, TenantProfileId): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, TenantProfileId): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other diff --git a/tb_rest_client/models/models_ce/test_sms_request.py b/tb_rest_client/models/models_ce/test_sms_request.py new file mode 100644 index 00000000..dc5db17a --- /dev/null +++ b/tb_rest_client/models/models_ce/test_sms_request.py @@ -0,0 +1,162 @@ +# 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 TestSmsRequest(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 = { + 'message': 'str', + 'number_to': 'str', + 'provider_configuration': 'SmsProviderConfiguration' + } + + attribute_map = { + 'message': 'message', + 'number_to': 'numberTo', + 'provider_configuration': 'providerConfiguration' + } + + def __init__(self, message=None, number_to=None, provider_configuration=None): # noqa: E501 + """TestSmsRequest - a model defined in Swagger""" # noqa: E501 + self._message = None + self._number_to = None + self._provider_configuration = None + self.discriminator = None + if message is not None: + self.message = message + if number_to is not None: + self.number_to = number_to + if provider_configuration is not None: + self.provider_configuration = provider_configuration + + @property + def message(self): + """Gets the message of this TestSmsRequest. # noqa: E501 + + + :return: The message of this TestSmsRequest. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this TestSmsRequest. + + + :param message: The message of this TestSmsRequest. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def number_to(self): + """Gets the number_to of this TestSmsRequest. # noqa: E501 + + + :return: The number_to of this TestSmsRequest. # noqa: E501 + :rtype: str + """ + return self._number_to + + @number_to.setter + def number_to(self, number_to): + """Sets the number_to of this TestSmsRequest. + + + :param number_to: The number_to of this TestSmsRequest. # noqa: E501 + :type: str + """ + + self._number_to = number_to + + @property + def provider_configuration(self): + """Gets the provider_configuration of this TestSmsRequest. # noqa: E501 + + + :return: The provider_configuration of this TestSmsRequest. # noqa: E501 + :rtype: SmsProviderConfiguration + """ + return self._provider_configuration + + @provider_configuration.setter + def provider_configuration(self, provider_configuration): + """Sets the provider_configuration of this TestSmsRequest. + + + :param provider_configuration: The provider_configuration of this TestSmsRequest. # noqa: E501 + :type: SmsProviderConfiguration + """ + + self._provider_configuration = provider_configuration + + 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(TestSmsRequest, 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, TestSmsRequest): + 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/ts_value.py b/tb_rest_client/models/models_ce/ts_value.py new file mode 100644 index 00000000..87824c01 --- /dev/null +++ b/tb_rest_client/models/models_ce/ts_value.py @@ -0,0 +1,136 @@ +# 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 TsValue(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 = { + 'ts': 'int', + 'value': 'str' + } + + attribute_map = { + 'ts': 'ts', + 'value': 'value' + } + + def __init__(self, ts=None, value=None): # noqa: E501 + """TsValue - a model defined in Swagger""" # noqa: E501 + self._ts = None + self._value = None + self.discriminator = None + if ts is not None: + self.ts = ts + if value is not None: + self.value = value + + @property + def ts(self): + """Gets the ts of this TsValue. # noqa: E501 + + + :return: The ts of this TsValue. # noqa: E501 + :rtype: int + """ + return self._ts + + @ts.setter + def ts(self, ts): + """Sets the ts of this TsValue. + + + :param ts: The ts of this TsValue. # noqa: E501 + :type: int + """ + + self._ts = ts + + @property + def value(self): + """Gets the value of this TsValue. # noqa: E501 + + + :return: The value of this TsValue. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this TsValue. + + + :param value: The value of this TsValue. # noqa: E501 + :type: str + """ + + self._value = 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(TsValue, 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, TsValue): + 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/update_message.py b/tb_rest_client/models/models_ce/update_message.py index 5273785a..d45b1e2d 100644 --- a/tb_rest_client/models/models_ce/update_message.py +++ b/tb_rest_client/models/models_ce/update_message.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 UpdateMessage(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 @@ -43,11 +39,9 @@ class UpdateMessage(object): def __init__(self, message=None, update_available=None): # noqa: E501 """UpdateMessage - a model defined in Swagger""" # noqa: E501 - self._message = None self._update_available = None self.discriminator = None - if message is not None: self.message = message if update_available is not None: diff --git a/tb_rest_client/models/models_ce/uri.py b/tb_rest_client/models/models_ce/uri.py new file mode 100644 index 00000000..6d849b2d --- /dev/null +++ b/tb_rest_client/models/models_ce/uri.py @@ -0,0 +1,526 @@ +# 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 new file mode 100644 index 00000000..ae7a8ac5 --- /dev/null +++ b/tb_rest_client/models/models_ce/url.py @@ -0,0 +1,370 @@ +# 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/url_stream_handler.py b/tb_rest_client/models/models_ce/url_stream_handler.py new file mode 100644 index 00000000..359d3944 --- /dev/null +++ b/tb_rest_client/models/models_ce/url_stream_handler.py @@ -0,0 +1,84 @@ +# 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 URLStreamHandler(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 + """URLStreamHandler - 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(URLStreamHandler, 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, URLStreamHandler): + 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 ba6022f0..fb40e9fb 100644 --- a/tb_rest_client/models/models_ce/user.py +++ b/tb_rest_client/models/models_ce/user.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 User(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 @@ -59,7 +55,6 @@ class User(object): def __init__(self, additional_info=None, authority=None, created_time=None, customer_id=None, email=None, first_name=None, id=None, last_name=None, name=None, tenant_id=None): # noqa: E501 """User - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._authority = None self._created_time = None @@ -71,7 +66,6 @@ def __init__(self, additional_info=None, authority=None, created_time=None, cust self._name = None self._tenant_id = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if authority is not None: diff --git a/tb_rest_client/models/models_ce/user_id.py b/tb_rest_client/models/models_ce/user_id.py index dd24a1f9..2dd2ba59 100644 --- a/tb_rest_client/models/models_ce/user_id.py +++ b/tb_rest_client/models/models_ce/user_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 UserId(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 @@ -32,70 +28,36 @@ class UserId(object): and the value is json key in definition. """ swagger_types = { - 'entity_type': 'str', 'id': 'str' } attribute_map = { - 'entity_type': 'entityType', 'id': 'id' } - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None + def __init__(self, id=None): # noqa: E501 + """UserId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type if id is not None: self.id = id - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 + """Gets the id of this UserId. # noqa: E501 - :return: The id of this EntityId. # noqa: E501 + :return: The id of this UserId. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this EntityId. + """Sets the id of this UserId. - :param id: The id of this EntityId. # noqa: E501 + :param id: The id of this UserId. # noqa: E501 :type: str """ @@ -122,7 +84,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(self.__class__, dict): + if issubclass(UserId, dict): for key, value in self.items(): result[key] = value @@ -138,7 +100,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): + if not isinstance(other, UserId): return False return self.__dict__ == other.__dict__ 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 f5253089..3376ab32 100644 --- a/tb_rest_client/models/models_ce/user_password_policy.py +++ b/tb_rest_client/models/models_ce/user_password_policy.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 UserPasswordPolicy(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 @@ -53,7 +49,6 @@ class UserPasswordPolicy(object): def __init__(self, minimum_digits=None, minimum_length=None, minimum_lowercase_letters=None, minimum_special_characters=None, minimum_uppercase_letters=None, password_expiration_period_days=None, password_reuse_frequency_days=None): # noqa: E501 """UserPasswordPolicy - a model defined in Swagger""" # noqa: E501 - self._minimum_digits = None self._minimum_length = None self._minimum_lowercase_letters = None @@ -62,7 +57,6 @@ def __init__(self, minimum_digits=None, minimum_length=None, minimum_lowercase_l self._password_expiration_period_days = None self._password_reuse_frequency_days = None self.discriminator = None - if minimum_digits is not None: self.minimum_digits = minimum_digits if minimum_length is not None: diff --git a/tb_rest_client/models/models_ce/widget_type.py b/tb_rest_client/models/models_ce/widget_type.py index 99593f95..8388443f 100644 --- a/tb_rest_client/models/models_ce/widget_type.py +++ b/tb_rest_client/models/models_ce/widget_type.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 WidgetType(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 @@ -53,7 +49,6 @@ class WidgetType(object): def __init__(self, alias=None, bundle_alias=None, created_time=None, descriptor=None, id=None, name=None, tenant_id=None): # noqa: E501 """WidgetType - a model defined in Swagger""" # noqa: E501 - self._alias = None self._bundle_alias = None self._created_time = None @@ -62,7 +57,6 @@ def __init__(self, alias=None, bundle_alias=None, created_time=None, descriptor= self._name = None self._tenant_id = None self.discriminator = None - if alias is not None: self.alias = alias if bundle_alias is not None: diff --git a/tb_rest_client/models/models_ce/widget_type_details.py b/tb_rest_client/models/models_ce/widget_type_details.py new file mode 100644 index 00000000..19e197af --- /dev/null +++ b/tb_rest_client/models/models_ce/widget_type_details.py @@ -0,0 +1,318 @@ +# 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 WidgetTypeDetails(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 = { + 'alias': 'str', + 'bundle_alias': 'str', + 'created_time': 'int', + 'description': 'str', + 'descriptor': 'str', + 'id': 'WidgetTypeId', + 'image': 'str', + 'name': 'str', + 'tenant_id': 'TenantId' + } + + attribute_map = { + 'alias': 'alias', + 'bundle_alias': 'bundleAlias', + 'created_time': 'createdTime', + 'description': 'description', + 'descriptor': 'descriptor', + 'id': 'id', + 'image': 'image', + 'name': 'name', + 'tenant_id': 'tenantId' + } + + def __init__(self, alias=None, bundle_alias=None, created_time=None, description=None, descriptor=None, id=None, image=None, name=None, tenant_id=None): # noqa: E501 + """WidgetTypeDetails - a model defined in Swagger""" # noqa: E501 + self._alias = None + self._bundle_alias = None + self._created_time = None + self._description = None + self._descriptor = None + self._id = None + self._image = None + self._name = None + self._tenant_id = None + self.discriminator = None + if alias is not None: + self.alias = alias + if bundle_alias is not None: + self.bundle_alias = bundle_alias + if created_time is not None: + self.created_time = created_time + if description is not None: + self.description = description + if descriptor is not None: + self.descriptor = descriptor + if id is not None: + self.id = id + if image is not None: + self.image = image + if name is not None: + self.name = name + if tenant_id is not None: + self.tenant_id = tenant_id + + @property + def alias(self): + """Gets the alias of this WidgetTypeDetails. # noqa: E501 + + + :return: The alias of this WidgetTypeDetails. # noqa: E501 + :rtype: str + """ + return self._alias + + @alias.setter + def alias(self, alias): + """Sets the alias of this WidgetTypeDetails. + + + :param alias: The alias of this WidgetTypeDetails. # noqa: E501 + :type: str + """ + + self._alias = alias + + @property + def bundle_alias(self): + """Gets the bundle_alias of this WidgetTypeDetails. # noqa: E501 + + + :return: The bundle_alias of this WidgetTypeDetails. # noqa: E501 + :rtype: str + """ + return self._bundle_alias + + @bundle_alias.setter + def bundle_alias(self, bundle_alias): + """Sets the bundle_alias of this WidgetTypeDetails. + + + :param bundle_alias: The bundle_alias of this WidgetTypeDetails. # noqa: E501 + :type: str + """ + + self._bundle_alias = bundle_alias + + @property + def created_time(self): + """Gets the created_time of this WidgetTypeDetails. # noqa: E501 + + + :return: The created_time of this WidgetTypeDetails. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this WidgetTypeDetails. + + + :param created_time: The created_time of this WidgetTypeDetails. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def description(self): + """Gets the description of this WidgetTypeDetails. # noqa: E501 + + + :return: The description of this WidgetTypeDetails. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this WidgetTypeDetails. + + + :param description: The description of this WidgetTypeDetails. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def descriptor(self): + """Gets the descriptor of this WidgetTypeDetails. # noqa: E501 + + + :return: The descriptor of this WidgetTypeDetails. # noqa: E501 + :rtype: str + """ + return self._descriptor + + @descriptor.setter + def descriptor(self, descriptor): + """Sets the descriptor of this WidgetTypeDetails. + + + :param descriptor: The descriptor of this WidgetTypeDetails. # noqa: E501 + :type: str + """ + + self._descriptor = descriptor + + @property + def id(self): + """Gets the id of this WidgetTypeDetails. # noqa: E501 + + + :return: The id of this WidgetTypeDetails. # noqa: E501 + :rtype: WidgetTypeId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this WidgetTypeDetails. + + + :param id: The id of this WidgetTypeDetails. # noqa: E501 + :type: WidgetTypeId + """ + + self._id = id + + @property + def image(self): + """Gets the image of this WidgetTypeDetails. # noqa: E501 + + + :return: The image of this WidgetTypeDetails. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this WidgetTypeDetails. + + + :param image: The image of this WidgetTypeDetails. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def name(self): + """Gets the name of this WidgetTypeDetails. # noqa: E501 + + + :return: The name of this WidgetTypeDetails. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this WidgetTypeDetails. + + + :param name: The name of this WidgetTypeDetails. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def tenant_id(self): + """Gets the tenant_id of this WidgetTypeDetails. # noqa: E501 + + + :return: The tenant_id of this WidgetTypeDetails. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this WidgetTypeDetails. + + + :param tenant_id: The tenant_id of this WidgetTypeDetails. # 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(WidgetTypeDetails, 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, WidgetTypeDetails): + 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_id.py b/tb_rest_client/models/models_ce/widget_type_id.py index ad966cde..5638d0d9 100644 --- a/tb_rest_client/models/models_ce/widget_type_id.py +++ b/tb_rest_client/models/models_ce/widget_type_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 WidgetTypeId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -32,70 +28,36 @@ class WidgetTypeId(object): and the value is json key in definition. """ swagger_types = { - 'entity_type': 'str', 'id': 'str' } attribute_map = { - 'entity_type': 'entityType', 'id': 'id' } - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None + def __init__(self, id=None): # noqa: E501 + """WidgetTypeId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type if id is not None: self.id = id - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 + """Gets the id of this WidgetTypeId. # noqa: E501 - :return: The id of this EntityId. # noqa: E501 + :return: The id of this WidgetTypeId. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this EntityId. + """Sets the id of this WidgetTypeId. - :param id: The id of this EntityId. # noqa: E501 + :param id: The id of this WidgetTypeId. # noqa: E501 :type: str """ @@ -122,7 +84,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(self.__class__, dict): + if issubclass(WidgetTypeId, dict): for key, value in self.items(): result[key] = value @@ -138,7 +100,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): + if not isinstance(other, WidgetTypeId): return False return self.__dict__ == other.__dict__ diff --git a/tb_rest_client/models/models_ce/widget_type_info.py b/tb_rest_client/models/models_ce/widget_type_info.py new file mode 100644 index 00000000..e9444278 --- /dev/null +++ b/tb_rest_client/models/models_ce/widget_type_info.py @@ -0,0 +1,318 @@ +# 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 WidgetTypeInfo(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 = { + 'alias': 'str', + 'bundle_alias': 'str', + 'created_time': 'int', + 'description': 'str', + 'id': 'WidgetTypeId', + 'image': 'str', + 'name': 'str', + 'tenant_id': 'TenantId', + 'widget_type': 'str' + } + + attribute_map = { + 'alias': 'alias', + 'bundle_alias': 'bundleAlias', + 'created_time': 'createdTime', + 'description': 'description', + 'id': 'id', + 'image': 'image', + 'name': 'name', + 'tenant_id': 'tenantId', + 'widget_type': 'widgetType' + } + + def __init__(self, alias=None, bundle_alias=None, created_time=None, description=None, id=None, image=None, name=None, tenant_id=None, widget_type=None): # noqa: E501 + """WidgetTypeInfo - a model defined in Swagger""" # noqa: E501 + self._alias = None + self._bundle_alias = None + self._created_time = None + self._description = None + self._id = None + self._image = None + self._name = None + self._tenant_id = None + self._widget_type = None + self.discriminator = None + if alias is not None: + self.alias = alias + if bundle_alias is not None: + self.bundle_alias = bundle_alias + if created_time is not None: + self.created_time = created_time + if description is not None: + self.description = description + if id is not None: + self.id = id + if image is not None: + self.image = image + if name is not None: + self.name = name + if tenant_id is not None: + self.tenant_id = tenant_id + if widget_type is not None: + self.widget_type = widget_type + + @property + def alias(self): + """Gets the alias of this WidgetTypeInfo. # noqa: E501 + + + :return: The alias of this WidgetTypeInfo. # noqa: E501 + :rtype: str + """ + return self._alias + + @alias.setter + def alias(self, alias): + """Sets the alias of this WidgetTypeInfo. + + + :param alias: The alias of this WidgetTypeInfo. # noqa: E501 + :type: str + """ + + self._alias = alias + + @property + def bundle_alias(self): + """Gets the bundle_alias of this WidgetTypeInfo. # noqa: E501 + + + :return: The bundle_alias of this WidgetTypeInfo. # noqa: E501 + :rtype: str + """ + return self._bundle_alias + + @bundle_alias.setter + def bundle_alias(self, bundle_alias): + """Sets the bundle_alias of this WidgetTypeInfo. + + + :param bundle_alias: The bundle_alias of this WidgetTypeInfo. # noqa: E501 + :type: str + """ + + self._bundle_alias = bundle_alias + + @property + def created_time(self): + """Gets the created_time of this WidgetTypeInfo. # noqa: E501 + + + :return: The created_time of this WidgetTypeInfo. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this WidgetTypeInfo. + + + :param created_time: The created_time of this WidgetTypeInfo. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def description(self): + """Gets the description of this WidgetTypeInfo. # noqa: E501 + + + :return: The description of this WidgetTypeInfo. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this WidgetTypeInfo. + + + :param description: The description of this WidgetTypeInfo. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def id(self): + """Gets the id of this WidgetTypeInfo. # noqa: E501 + + + :return: The id of this WidgetTypeInfo. # noqa: E501 + :rtype: WidgetTypeId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this WidgetTypeInfo. + + + :param id: The id of this WidgetTypeInfo. # noqa: E501 + :type: WidgetTypeId + """ + + self._id = id + + @property + def image(self): + """Gets the image of this WidgetTypeInfo. # noqa: E501 + + + :return: The image of this WidgetTypeInfo. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this WidgetTypeInfo. + + + :param image: The image of this WidgetTypeInfo. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def name(self): + """Gets the name of this WidgetTypeInfo. # noqa: E501 + + + :return: The name of this WidgetTypeInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this WidgetTypeInfo. + + + :param name: The name of this WidgetTypeInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def tenant_id(self): + """Gets the tenant_id of this WidgetTypeInfo. # noqa: E501 + + + :return: The tenant_id of this WidgetTypeInfo. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this WidgetTypeInfo. + + + :param tenant_id: The tenant_id of this WidgetTypeInfo. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def widget_type(self): + """Gets the widget_type of this WidgetTypeInfo. # noqa: E501 + + + :return: The widget_type of this WidgetTypeInfo. # noqa: E501 + :rtype: str + """ + return self._widget_type + + @widget_type.setter + def widget_type(self, widget_type): + """Sets the widget_type of this WidgetTypeInfo. + + + :param widget_type: The widget_type of this WidgetTypeInfo. # noqa: E501 + :type: str + """ + + self._widget_type = widget_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(WidgetTypeInfo, 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, WidgetTypeInfo): + 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/widgets_bundle.py b/tb_rest_client/models/models_ce/widgets_bundle.py index 20d2dbe0..d52637db 100644 --- a/tb_rest_client/models/models_ce/widgets_bundle.py +++ b/tb_rest_client/models/models_ce/widgets_bundle.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 WidgetsBundle(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -34,8 +30,9 @@ class WidgetsBundle(object): swagger_types = { 'alias': 'str', 'created_time': 'int', + 'description': 'str', 'id': 'WidgetsBundleId', - 'image': 'list[str]', + 'image': 'str', 'tenant_id': 'TenantId', 'title': 'str' } @@ -43,27 +40,29 @@ class WidgetsBundle(object): attribute_map = { 'alias': 'alias', 'created_time': 'createdTime', + 'description': 'description', 'id': 'id', 'image': 'image', 'tenant_id': 'tenantId', 'title': 'title' } - def __init__(self, alias=None, created_time=None, id=None, image=None, tenant_id=None, title=None): # noqa: E501 + def __init__(self, alias=None, created_time=None, description=None, id=None, image=None, tenant_id=None, title=None): # noqa: E501 """WidgetsBundle - a model defined in Swagger""" # noqa: E501 - self._alias = None self._created_time = None + self._description = None self._id = None self._image = None self._tenant_id = None self._title = None self.discriminator = None - if alias is not None: self.alias = alias if created_time is not None: self.created_time = created_time + if description is not None: + self.description = description if id is not None: self.id = id if image is not None: @@ -115,6 +114,27 @@ def created_time(self, created_time): self._created_time = created_time + @property + def description(self): + """Gets the description of this WidgetsBundle. # noqa: E501 + + + :return: The description of this WidgetsBundle. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this WidgetsBundle. + + + :param description: The description of this WidgetsBundle. # noqa: E501 + :type: str + """ + + self._description = description + @property def id(self): """Gets the id of this WidgetsBundle. # noqa: E501 @@ -142,7 +162,7 @@ def image(self): :return: The image of this WidgetsBundle. # noqa: E501 - :rtype: list[str] + :rtype: str """ return self._image @@ -152,7 +172,7 @@ def image(self, image): :param image: The image of this WidgetsBundle. # noqa: E501 - :type: list[str] + :type: str """ self._image = image 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 78b39729..8bc7b5d6 100644 --- a/tb_rest_client/models/models_ce/widgets_bundle_id.py +++ b/tb_rest_client/models/models_ce/widgets_bundle_id.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 WidgetsBundleId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -32,70 +28,36 @@ class WidgetsBundleId(object): and the value is json key in definition. """ swagger_types = { - 'entity_type': 'str', 'id': 'str' } attribute_map = { - 'entity_type': 'entityType', 'id': 'id' } - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None + def __init__(self, id=None): # noqa: E501 + """WidgetsBundleId - a model defined in Swagger""" # noqa: E501 self._id = None self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type if id is not None: self.id = id - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 + """Gets the id of this WidgetsBundleId. # noqa: E501 - :return: The id of this EntityId. # noqa: E501 + :return: The id of this WidgetsBundleId. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): - """Sets the id of this EntityId. + """Sets the id of this WidgetsBundleId. - :param id: The id of this EntityId. # noqa: E501 + :param id: The id of this WidgetsBundleId. # noqa: E501 :type: str """ @@ -122,7 +84,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(self.__class__, dict): + if issubclass(WidgetsBundleId, dict): for key, value in self.items(): result[key] = value @@ -138,7 +100,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): + if not isinstance(other, WidgetsBundleId): return False return self.__dict__ == other.__dict__ diff --git a/tb_rest_client/models/models_pe/__init__.py b/tb_rest_client/models/models_pe/__init__.py index 542398dc..de3fb9bb 100644 --- a/tb_rest_client/models/models_pe/__init__.py +++ b/tb_rest_client/models/models_pe/__init__.py @@ -1,148 +1,70 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# flake8: noqa -from __future__ import absolute_import - -# import models_base into model package - -# from tb_rest_client.models.models_base.admin_settings import AdminSettings -# from tb_rest_client.models.models_base.admin_settings_id import AdminSettingsId -# from tb_rest_client.models.models_base.response_entity import ResponseEntity -# from tb_rest_client.models.models_base.alarm import Alarm -# from tb_rest_client.models.models_base.alarm_id import AlarmId -# from tb_rest_client.models.models_base.alarm_info import AlarmInfo -# from tb_rest_client.models.models_base.asset_id import AssetId -# from tb_rest_client.models.models_base.asset_search_query import AssetSearchQuery -# from tb_rest_client.models.models_base.attributes_entity_view import AttributesEntityView -# from tb_rest_client.models.models_base.audit_log_id import AuditLogId -# from tb_rest_client.models.models_base.blob_entity_id import BlobEntityId -# from tb_rest_client.models.models_base.claim_request import ClaimRequest -# from tb_rest_client.models.models_base.component_descriptor_id import ComponentDescriptorId -# from tb_rest_client.models.models_base.converter_id import ConverterId -# from tb_rest_client.models.models_base.customer_id import CustomerId -# from tb_rest_client.models.models_base.role_id import RoleId -# from tb_rest_client.models.models_base.rule_chain import RuleChain -# from tb_rest_client.models.models_base.rule_chain_connection_info import RuleChainConnectionInfo -# from tb_rest_client.models.models_base.rule_chain_id import RuleChainId -# from tb_rest_client.models.models_base.rule_chain_meta_data import RuleChainMetaData -# from tb_rest_client.models.models_base.rule_node import RuleNode -# from tb_rest_client.models.models_base.rule_node_id import RuleNodeId -# from tb_rest_client.models.models_base.scheduler_event_id import SchedulerEventId -# from tb_rest_client.models.models_base.security_settings import SecuritySettings -# from tb_rest_client.models.models_base.short_customer_info import ShortCustomerInfo -# from tb_rest_client.models.models_base.telemetry_entity_view import TelemetryEntityView -# from tb_rest_client.models.models_base.tenant import Tenant -# from tb_rest_client.models.models_base.tenant_id import TenantId -# from tb_rest_client.models.models_base.update_message import UpdateMessage -# from tb_rest_client.models.models_base.user_id import UserId -# from tb_rest_client.models.models_base.user_password_policy import UserPasswordPolicy -# from tb_rest_client.models.models_base.widget_type import WidgetType -# from tb_rest_client.models.models_base.widget_type_id import WidgetTypeId -# from tb_rest_client.models.models_base.widgets_bundle import WidgetsBundle -# from tb_rest_client.models.models_base.widgets_bundle_id import WidgetsBundleId -# from tb_rest_client.models.models_base.dashboard_id import DashboardId -# from tb_rest_client.models.models_base.deferred_result_response_entity import DeferredResultResponseEntity -# from tb_rest_client.models.models_base.device_credentials import DeviceCredentials -# from tb_rest_client.models.models_base.device_credentials_id import DeviceCredentialsId -# from tb_rest_client.models.models_base.device_id import DeviceId -# from tb_rest_client.models.models_base.device_search_query import DeviceSearchQuery -# from tb_rest_client.models.models_base.entity_group_id import EntityGroupId -# from tb_rest_client.models.models_base.entity_id import EntityId -# from tb_rest_client.models.models_base.entity_relations_query import EntityRelationsQuery -# from tb_rest_client.models.models_base.entity_view_id import EntityViewId -# from tb_rest_client.models.models_base.entity_view_search_query import EntityViewSearchQuery -# from tb_rest_client.models.models_base.event import Event -# from tb_rest_client.models.models_base.event_id import EventId -# from tb_rest_client.models.models_base.group_permission_id import GroupPermissionId -# from tb_rest_client.models.models_base.integration_id import IntegrationId -# from tb_rest_client.models.models_base.node_connection_info import NodeConnectionInfo -# from tb_rest_client.models.models_base.o_auth2_client_info import OAuth2ClientInfo -# from tb_rest_client.models.models_base.o_auth2_integration_id import OAuth2IntegrationId - -# import models_pe into model package - +from .merged_user_permissions import MergedUserPermissions +from .entity_data import EntityData +from .scheduler_event_info import SchedulerEventInfo +from .group_permission import GroupPermission +from .user import User +from .entity_id import EntityId from .allowed_permissions_info import AllowedPermissionsInfo -from .asset import Asset -from .audit_log import AuditLog -from .blob_entity_info import BlobEntityInfo -from .blob_entity_with_customer_info import BlobEntityWithCustomerInfo -from .component_descriptor import ComponentDescriptor -from .contact_basedobject import ContactBasedobject -from .converter import Converter -from .custom_menu import CustomMenu -from .custom_menu_item import CustomMenuItem -from .custom_translation import CustomTranslation -from .customer import Customer -from .dashboard import Dashboard +from .device_group_ota_package import DeviceGroupOtaPackage +from .login_white_labeling_params import LoginWhiteLabelingParams +from .sign_up_request import SignUpRequest +from .share_group_request import ShareGroupRequest +from .home_dashboard import HomeDashboard from .dashboard_info import DashboardInfo -from .device import Device -from .entity_group import EntityGroup -from .entity_group_info import EntityGroupInfo -from .entity_relation import EntityRelation +from .edge import Edge +from .scheduler_event_with_customer_info import SchedulerEventWithCustomerInfo from .entity_relation_info import EntityRelationInfo -from .entity_subtype import EntitySubtype -from .entity_type_filter import EntityTypeFilter -from .entity_view import EntityView -from .favicon import Favicon -from .file import File -from .group_permission import GroupPermission -from .group_permission_info import GroupPermissionInfo -from .input_stream import InputStream -from .integration import Integration -from .login_white_labeling_params import LoginWhiteLabelingParams -from .merged_group_permission_info import MergedGroupPermissionInfo -from .merged_group_type_permission_info import MergedGroupTypePermissionInfo -from .merged_user_permissions import MergedUserPermissions -from .page_data_alarm_info import PageDataAlarmInfo -from .page_data_asset import PageDataAsset -from .page_data_audit_log import PageDataAuditLog -from .page_data_blob_entity_with_customer_info import PageDataBlobEntityWithCustomerInfo -from .page_data_contact_basedobject import PageDataContactBasedobject +from .component_descriptor import ComponentDescriptor +from .group_permission_id import GroupPermissionId from .page_data_converter import PageDataConverter -from .page_data_customer import PageDataCustomer -from .page_data_dashboard_info import PageDataDashboardInfo -from .page_data_device import PageDataDevice -from .page_data_entity_view import PageDataEntityView -from .page_data_event import PageDataEvent +from .role_id import RoleId +from .asset import Asset from .page_data_integration import PageDataIntegration -from .page_data_role import PageDataRole -from .page_data_rule_chain import PageDataRuleChain +from .device import Device +from .sign_up_self_registration_params import SignUpSelfRegistrationParams +from .report_config import ReportConfig from .page_data_short_entity_view import PageDataShortEntityView -from .page_data_tenant import PageDataTenant -from .page_data_user import PageDataUser -from .page_data_widgets_bundle import PageDataWidgetsBundle +from .user_id import UserId +from .integration_id import IntegrationId +from .page_data_entity_group_info import PageDataEntityGroupInfo +from .merged_group_permission_info import MergedGroupPermissionInfo +from .page_data_scheduler_event_info import PageDataSchedulerEventInfo +from .entity_view_id import EntityViewId +from .merged_group_type_permission_info import MergedGroupTypePermissionInfo +from .page_data_role import PageDataRole +from .entity_view import EntityView +from .favicon import Favicon +from .converter import Converter +from .entity_group_id import EntityGroupId +from .edge_event import EdgeEvent +from .short_entity_view import ShortEntityView +from .custom_menu_item import CustomMenuItem +from .role import Role +from .entity_group_info import EntityGroupInfo from .palette import Palette +from .entity_subtype import EntitySubtype +from .integration import Integration from .palette_settings import PaletteSettings +from .dashboard import Dashboard +from .custom_menu import CustomMenu from .relations_search_parameters import RelationsSearchParameters -from .report_config import ReportConfig -from .resource import Resource -from .role import Role -from .scheduler_event import SchedulerEvent -from .scheduler_event_info import SchedulerEventInfo -from .scheduler_event_with_customer_info import SchedulerEventWithCustomerInfo +from .o_auth2_basic_mapper_config import OAuth2BasicMapperConfig +from .group_permission_info import GroupPermissionInfo +from .entity_group import EntityGroup +from .custom_translation import CustomTranslation +from .contact_basedobject import ContactBasedobject +from .customer import Customer +from .relation_entity_type_filter import RelationEntityTypeFilter +from .blob_entity_id import BlobEntityId +from .blob_entity_with_customer_info import BlobEntityWithCustomerInfo from .self_registration_params import SelfRegistrationParams -from .short_entity_view import ShortEntityView -from .sign_up_request import SignUpRequest -from .sign_up_self_registration_params import SignUpSelfRegistrationParams -from .tenant_profile import TenantProfile -from .tenant_profile_configuration import TenantProfileConfiguration -from .tenant_profile_data import TenantProfileData -from .tenant_solution_template_instructions import TenantSolutionTemplateInstructions -from .uri import URI -from .url import URL -from .user import User +from .converter_id import ConverterId +from .scheduler_event import SchedulerEvent +from .page_data_blob_entity_with_customer_info import PageDataBlobEntityWithCustomerInfo +from .entity_relation import EntityRelation +from .audit_log import AuditLog +from .scheduler_event_id import SchedulerEventId from .white_labeling_params import WhiteLabelingParams +from .asset_id import AssetId +from .blob_entity_info import BlobEntityInfo +from .page_data_contact_basedobject import PageDataContactBasedobject 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 2ee11251..7f0772df 100644 --- a/tb_rest_client/models/models_pe/allowed_permissions_info.py +++ b/tb_rest_client/models/models_pe/allowed_permissions_info.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 AllowedPermissionsInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -53,7 +49,6 @@ class AllowedPermissionsInfo(object): def __init__(self, allowed_for_group_owner_only_group_operations=None, allowed_for_group_owner_only_operations=None, allowed_for_group_role_operations=None, allowed_resources=None, operations_by_resource=None, user_owner_id=None, user_permissions=None): # noqa: E501 """AllowedPermissionsInfo - a model defined in Swagger""" # noqa: E501 - self._allowed_for_group_owner_only_group_operations = None self._allowed_for_group_owner_only_operations = None self._allowed_for_group_role_operations = None @@ -62,7 +57,6 @@ def __init__(self, allowed_for_group_owner_only_group_operations=None, allowed_f self._user_owner_id = None self._user_permissions = None self.discriminator = None - if allowed_for_group_owner_only_group_operations is not None: self.allowed_for_group_owner_only_group_operations = allowed_for_group_owner_only_group_operations if allowed_for_group_owner_only_operations is not None: @@ -96,7 +90,7 @@ def allowed_for_group_owner_only_group_operations(self, allowed_for_group_owner_ :param allowed_for_group_owner_only_group_operations: The allowed_for_group_owner_only_group_operations of this AllowedPermissionsInfo. # noqa: E501 :type: list[str] """ - allowed_values = ["ALL", "CREATE", "READ", "WRITE", "DELETE", "RPC_CALL", "READ_CREDENTIALS", "WRITE_CREDENTIALS", "READ_ATTRIBUTES", "WRITE_ATTRIBUTES", "READ_TELEMETRY", "WRITE_TELEMETRY", "ADD_TO_GROUP", "REMOVE_FROM_GROUP", "CHANGE_OWNER", "IMPERSONATE", "CLAIM_DEVICES", "SHARE_GROUP"] # noqa: E501 + allowed_values = ["ALL", "CREATE", "READ", "WRITE", "DELETE", "RPC_CALL", "READ_CREDENTIALS", "WRITE_CREDENTIALS", "READ_ATTRIBUTES", "WRITE_ATTRIBUTES", "READ_TELEMETRY", "WRITE_TELEMETRY", "ADD_TO_GROUP", "REMOVE_FROM_GROUP", "CHANGE_OWNER", "IMPERSONATE", "CLAIM_DEVICES", "SHARE_GROUP", "ASSIGN_TO_TENANT"] # noqa: E501 if not set(allowed_for_group_owner_only_group_operations).issubset(set(allowed_values)): raise ValueError( "Invalid values for `allowed_for_group_owner_only_group_operations` [{0}], must be a subset of [{1}]" # noqa: E501 @@ -124,7 +118,7 @@ def allowed_for_group_owner_only_operations(self, allowed_for_group_owner_only_o :param allowed_for_group_owner_only_operations: The allowed_for_group_owner_only_operations of this AllowedPermissionsInfo. # noqa: E501 :type: list[str] """ - allowed_values = ["ALL", "CREATE", "READ", "WRITE", "DELETE", "RPC_CALL", "READ_CREDENTIALS", "WRITE_CREDENTIALS", "READ_ATTRIBUTES", "WRITE_ATTRIBUTES", "READ_TELEMETRY", "WRITE_TELEMETRY", "ADD_TO_GROUP", "REMOVE_FROM_GROUP", "CHANGE_OWNER", "IMPERSONATE", "CLAIM_DEVICES", "SHARE_GROUP"] # noqa: E501 + allowed_values = ["ALL", "CREATE", "READ", "WRITE", "DELETE", "RPC_CALL", "READ_CREDENTIALS", "WRITE_CREDENTIALS", "READ_ATTRIBUTES", "WRITE_ATTRIBUTES", "READ_TELEMETRY", "WRITE_TELEMETRY", "ADD_TO_GROUP", "REMOVE_FROM_GROUP", "CHANGE_OWNER", "IMPERSONATE", "CLAIM_DEVICES", "SHARE_GROUP", "ASSIGN_TO_TENANT"] # noqa: E501 if not set(allowed_for_group_owner_only_operations).issubset(set(allowed_values)): raise ValueError( "Invalid values for `allowed_for_group_owner_only_operations` [{0}], must be a subset of [{1}]" # noqa: E501 @@ -152,7 +146,7 @@ def allowed_for_group_role_operations(self, allowed_for_group_role_operations): :param allowed_for_group_role_operations: The allowed_for_group_role_operations of this AllowedPermissionsInfo. # noqa: E501 :type: list[str] """ - allowed_values = ["ALL", "CREATE", "READ", "WRITE", "DELETE", "RPC_CALL", "READ_CREDENTIALS", "WRITE_CREDENTIALS", "READ_ATTRIBUTES", "WRITE_ATTRIBUTES", "READ_TELEMETRY", "WRITE_TELEMETRY", "ADD_TO_GROUP", "REMOVE_FROM_GROUP", "CHANGE_OWNER", "IMPERSONATE", "CLAIM_DEVICES", "SHARE_GROUP"] # noqa: E501 + allowed_values = ["ALL", "CREATE", "READ", "WRITE", "DELETE", "RPC_CALL", "READ_CREDENTIALS", "WRITE_CREDENTIALS", "READ_ATTRIBUTES", "WRITE_ATTRIBUTES", "READ_TELEMETRY", "WRITE_TELEMETRY", "ADD_TO_GROUP", "REMOVE_FROM_GROUP", "CHANGE_OWNER", "IMPERSONATE", "CLAIM_DEVICES", "SHARE_GROUP", "ASSIGN_TO_TENANT"] # noqa: E501 if not set(allowed_for_group_role_operations).issubset(set(allowed_values)): raise ValueError( "Invalid values for `allowed_for_group_role_operations` [{0}], must be a subset of [{1}]" # noqa: E501 @@ -180,7 +174,7 @@ def allowed_resources(self, allowed_resources): :param allowed_resources: The allowed_resources of this AllowedPermissionsInfo. # noqa: E501 :type: list[str] """ - allowed_values = ["ALL", "PROFILE", "ADMIN_SETTINGS", "ALARM", "DEVICE", "ASSET", "CUSTOMER", "DASHBOARD", "ENTITY_VIEW", "TENANT", "RULE_CHAIN", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE", "CONVERTER", "INTEGRATION", "SCHEDULER_EVENT", "BLOB_ENTITY", "CUSTOMER_GROUP", "DEVICE_GROUP", "ASSET_GROUP", "USER_GROUP", "ENTITY_VIEW_GROUP", "DASHBOARD_GROUP", "ROLE", "GROUP_PERMISSION", "WHITE_LABELING", "AUDIT_LOG"] # noqa: E501 + allowed_values = ["ALL", "PROFILE", "ADMIN_SETTINGS", "ALARM", "DEVICE", "ASSET", "CUSTOMER", "DASHBOARD", "ENTITY_VIEW", "EDGE", "TENANT", "RULE_CHAIN", "USER", "WIDGETS_BUNDLE", "WIDGET_TYPE", "OAUTH2_CONFIGURATION_INFO", "OAUTH2_CONFIGURATION_TEMPLATE", "TENANT_PROFILE", "DEVICE_PROFILE", "CONVERTER", "INTEGRATION", "SCHEDULER_EVENT", "BLOB_ENTITY", "CUSTOMER_GROUP", "DEVICE_GROUP", "ASSET_GROUP", "USER_GROUP", "ENTITY_VIEW_GROUP", "EDGE_GROUP", "DASHBOARD_GROUP", "ROLE", "GROUP_PERMISSION", "WHITE_LABELING", "AUDIT_LOG", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE"] # 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 @@ -208,7 +202,7 @@ def operations_by_resource(self, operations_by_resource): :param operations_by_resource: The operations_by_resource of this AllowedPermissionsInfo. # noqa: E501 :type: dict(str, list[str]) """ - allowed_values = ["ALL", "CREATE", "READ", "WRITE", "DELETE", "RPC_CALL", "READ_CREDENTIALS", "WRITE_CREDENTIALS", "READ_ATTRIBUTES", "WRITE_ATTRIBUTES", "READ_TELEMETRY", "WRITE_TELEMETRY", "ADD_TO_GROUP", "REMOVE_FROM_GROUP", "CHANGE_OWNER", "IMPERSONATE", "CLAIM_DEVICES", "SHARE_GROUP"] # noqa: E501 + allowed_values = [ALL, CREATE, READ, WRITE, DELETE, RPC_CALL, READ_CREDENTIALS, WRITE_CREDENTIALS, READ_ATTRIBUTES, WRITE_ATTRIBUTES, READ_TELEMETRY, WRITE_TELEMETRY, ADD_TO_GROUP, REMOVE_FROM_GROUP, CHANGE_OWNER, IMPERSONATE, CLAIM_DEVICES, SHARE_GROUP, ASSIGN_TO_TENANT] # noqa: E501 if not set(operations_by_resource.keys()).issubset(set(allowed_values)): raise ValueError( "Invalid keys in `operations_by_resource` [{0}], must be a subset of [{1}]" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/asset.py b/tb_rest_client/models/models_pe/asset.py index dec7847b..3874c0d7 100644 --- a/tb_rest_client/models/models_pe/asset.py +++ b/tb_rest_client/models/models_pe/asset.py @@ -1,31 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 -from tb_rest_client.models.models_ce import Asset - - -class Asset(Asset): +class Asset(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 @@ -33,14 +27,186 @@ class Asset(Asset): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - swagger_types = {**Asset.swagger_types, "owner_id": "EntityId"} - attribute_map = {**Asset.attribute_map, "owner_id": "ownerId"} + swagger_types = { + 'additional_info': 'str', + 'created_time': 'int', + 'customer_id': 'CustomerId', + 'id': 'AssetId', + 'label': 'str', + 'name': 'str', + 'owner_id': 'EntityId', + 'tenant_id': 'TenantId', + 'type': 'str' + } + + attribute_map = { + 'additional_info': 'additionalInfo', + 'created_time': 'createdTime', + 'customer_id': 'customerId', + 'id': 'id', + 'label': 'label', + 'name': 'name', + 'owner_id': 'ownerId', + 'tenant_id': 'tenantId', + 'type': 'type' + } def __init__(self, additional_info=None, created_time=None, customer_id=None, id=None, label=None, name=None, owner_id=None, tenant_id=None, type=None): # noqa: E501 """Asset - a model defined in Swagger""" # noqa: E501 + self._additional_info = None + self._created_time = None + self._customer_id = None + self._id = None + self._label = None + self._name = None + self._owner_id = None + self._tenant_id = None + self._type = None + self.discriminator = None + if additional_info is not None: + self.additional_info = additional_info + if created_time is not None: + self.created_time = created_time + if customer_id is not None: + self.customer_id = customer_id + if id is not None: + self.id = id + if label is not None: + self.label = label + if name is not None: + self.name = name + if owner_id is not None: + self.owner_id = owner_id + if tenant_id is not None: + self.tenant_id = tenant_id + if type is not None: + self.type = type - super().__init__(additional_info, created_time, customer_id, id, label, name, tenant_id, type) - self._owner_id = owner_id + @property + def additional_info(self): + """Gets the additional_info of this Asset. # noqa: E501 + + + :return: The additional_info of this Asset. # noqa: E501 + :rtype: str + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this Asset. + + + :param additional_info: The additional_info of this Asset. # noqa: E501 + :type: str + """ + + self._additional_info = additional_info + + @property + def created_time(self): + """Gets the created_time of this Asset. # noqa: E501 + + + :return: The created_time of this Asset. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this Asset. + + + :param created_time: The created_time of this Asset. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def customer_id(self): + """Gets the customer_id of this Asset. # noqa: E501 + + + :return: The customer_id of this Asset. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this Asset. + + + :param customer_id: The customer_id of this Asset. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + + @property + def id(self): + """Gets the id of this Asset. # noqa: E501 + + + :return: The id of this Asset. # noqa: E501 + :rtype: AssetId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Asset. + + + :param id: The id of this Asset. # noqa: E501 + :type: AssetId + """ + + self._id = id + + @property + def label(self): + """Gets the label of this Asset. # noqa: E501 + + + :return: The label of this Asset. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this Asset. + + + :param label: The label of this Asset. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def name(self): + """Gets the name of this Asset. # noqa: E501 + + + :return: The name of this Asset. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Asset. + + + :param name: The name of this Asset. # noqa: E501 + :type: str + """ + + self._name = name @property def owner_id(self): @@ -62,3 +228,91 @@ def owner_id(self, owner_id): """ self._owner_id = owner_id + + @property + def tenant_id(self): + """Gets the tenant_id of this Asset. # noqa: E501 + + + :return: The tenant_id of this Asset. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this Asset. + + + :param tenant_id: The tenant_id of this Asset. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def type(self): + """Gets the type of this Asset. # noqa: E501 + + + :return: The type of this Asset. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Asset. + + + :param type: The type of this Asset. # noqa: E501 + :type: str + """ + + 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(Asset, 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, Asset): + 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_id.py b/tb_rest_client/models/models_pe/asset_id.py new file mode 100644 index 00000000..bfcf9129 --- /dev/null +++ b/tb_rest_client/models/models_pe/asset_id.py @@ -0,0 +1,111 @@ +# 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 AssetId(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 + """AssetId - 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 AssetId. # noqa: E501 + + + :return: The id of this AssetId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AssetId. + + + :param id: The id of this AssetId. # 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(AssetId, 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, AssetId): + 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/audit_log.py b/tb_rest_client/models/models_pe/audit_log.py index 552881c7..efa2682f 100644 --- a/tb_rest_client/models/models_pe/audit_log.py +++ b/tb_rest_client/models/models_pe/audit_log.py @@ -1,34 +1,170 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 -from tb_rest_client.models.models_ce import AuditLog +class AuditLog(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 = { + 'action_data': 'str', + 'action_failure_details': 'str', + 'action_status': 'str', + 'action_type': 'str', + 'created_time': 'int', + 'customer_id': 'CustomerId', + 'entity_id': 'EntityId', + 'entity_name': 'str', + 'id': 'AuditLogId', + 'tenant_id': 'TenantId', + 'user_id': 'UserId', + 'user_name': 'str' + } -class AuditLog(AuditLog): + attribute_map = { + 'action_data': 'actionData', + 'action_failure_details': 'actionFailureDetails', + 'action_status': 'actionStatus', + 'action_type': 'actionType', + 'created_time': 'createdTime', + 'customer_id': 'customerId', + 'entity_id': 'entityId', + 'entity_name': 'entityName', + 'id': 'id', + 'tenant_id': 'tenantId', + 'user_id': 'userId', + 'user_name': 'userName' + } def __init__(self, action_data=None, action_failure_details=None, action_status=None, action_type=None, created_time=None, customer_id=None, entity_id=None, entity_name=None, id=None, tenant_id=None, user_id=None, user_name=None): # noqa: E501 - super().__init__(action_data, action_failure_details, action_status, action_type, created_time, customer_id, entity_id, entity_name, id, tenant_id, user_id, user_name) + """AuditLog - a model defined in Swagger""" # noqa: E501 self._action_data = None + self._action_failure_details = None + self._action_status = None + self._action_type = None + self._created_time = None + self._customer_id = None + self._entity_id = None + self._entity_name = None + self._id = None + self._tenant_id = None + self._user_id = None + self._user_name = None + self.discriminator = None if action_data is not None: self.action_data = action_data + if action_failure_details is not None: + self.action_failure_details = action_failure_details + if action_status is not None: + self.action_status = action_status + if action_type is not None: + self.action_type = action_type + if created_time is not None: + self.created_time = created_time + if customer_id is not None: + self.customer_id = customer_id + if entity_id is not None: + self.entity_id = entity_id + if entity_name is not None: + self.entity_name = entity_name + if id is not None: + self.id = id + if tenant_id is not None: + self.tenant_id = tenant_id + if user_id is not None: + self.user_id = user_id + if user_name is not None: + self.user_name = user_name + + @property + def action_data(self): + """Gets the action_data of this AuditLog. # noqa: E501 + + + :return: The action_data of this AuditLog. # noqa: E501 + :rtype: str + """ + return self._action_data + + @action_data.setter + def action_data(self, action_data): + """Sets the action_data of this AuditLog. + + + :param action_data: The action_data of this AuditLog. # noqa: E501 + :type: str + """ + + self._action_data = action_data + + @property + def action_failure_details(self): + """Gets the action_failure_details of this AuditLog. # noqa: E501 + + + :return: The action_failure_details of this AuditLog. # noqa: E501 + :rtype: str + """ + return self._action_failure_details + + @action_failure_details.setter + def action_failure_details(self, action_failure_details): + """Sets the action_failure_details of this AuditLog. + + + :param action_failure_details: The action_failure_details of this AuditLog. # noqa: E501 + :type: str + """ + + self._action_failure_details = action_failure_details + + @property + def action_status(self): + """Gets the action_status of this AuditLog. # noqa: E501 + + + :return: The action_status of this AuditLog. # noqa: E501 + :rtype: str + """ + return self._action_status + + @action_status.setter + def action_status(self, action_status): + """Sets the action_status of this AuditLog. + + + :param action_status: The action_status of this AuditLog. # noqa: E501 + :type: str + """ + allowed_values = ["SUCCESS", "FAILURE"] # noqa: E501 + if action_status not in allowed_values: + raise ValueError( + "Invalid value for `action_status` ({0}), must be one of {1}" # noqa: E501 + .format(action_status, allowed_values) + ) + + self._action_status = action_status @property def action_type(self): @@ -48,7 +184,7 @@ def action_type(self, action_type): :param action_type: The action_type of this AuditLog. # noqa: E501 :type: str """ - allowed_values = ["ADDED", "DELETED", "UPDATED", "ATTRIBUTES_UPDATED", "ATTRIBUTES_DELETED", "TIMESERIES_DELETED", "RPC_CALL", "CREDENTIALS_UPDATED", "ASSIGNED_TO_CUSTOMER", "UNASSIGNED_FROM_CUSTOMER", "CHANGE_OWNER", "ACTIVATED", "SUSPENDED", "CREDENTIALS_READ", "ATTRIBUTES_READ", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "RELATIONS_DELETED", "ALARM_ACK", "ALARM_CLEAR", "ADDED_TO_ENTITY_GROUP", "REMOVED_FROM_ENTITY_GROUP", "REST_API_RULE_ENGINE_CALL", "MADE_PUBLIC", "MADE_PRIVATE", "LOGIN", "LOGOUT", "LOCKOUT"] # noqa: E501 + allowed_values = ["ADDED", "DELETED", "UPDATED", "ATTRIBUTES_UPDATED", "ATTRIBUTES_DELETED", "TIMESERIES_UPDATED", "TIMESERIES_DELETED", "RPC_CALL", "CREDENTIALS_UPDATED", "ASSIGNED_TO_CUSTOMER", "UNASSIGNED_FROM_CUSTOMER", "CHANGE_OWNER", "ACTIVATED", "SUSPENDED", "CREDENTIALS_READ", "ATTRIBUTES_READ", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "RELATIONS_DELETED", "ALARM_ACK", "ALARM_CLEAR", "ALARM_DELETE", "ADDED_TO_ENTITY_GROUP", "REMOVED_FROM_ENTITY_GROUP", "REST_API_RULE_ENGINE_CALL", "MADE_PUBLIC", "MADE_PRIVATE", "LOGIN", "LOGOUT", "LOCKOUT", "ASSIGNED_FROM_TENANT", "ASSIGNED_TO_TENANT", "PROVISION_SUCCESS", "PROVISION_FAILURE", "ASSIGNED_TO_EDGE", "UNASSIGNED_FROM_EDGE"] # noqa: E501 if action_type not in allowed_values: raise ValueError( "Invalid value for `action_type` ({0}), must be one of {1}" # noqa: E501 @@ -56,3 +192,217 @@ def action_type(self, action_type): ) self._action_type = action_type + + @property + def created_time(self): + """Gets the created_time of this AuditLog. # noqa: E501 + + + :return: The created_time of this AuditLog. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this AuditLog. + + + :param created_time: The created_time of this AuditLog. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def customer_id(self): + """Gets the customer_id of this AuditLog. # noqa: E501 + + + :return: The customer_id of this AuditLog. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this AuditLog. + + + :param customer_id: The customer_id of this AuditLog. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + + @property + def entity_id(self): + """Gets the entity_id of this AuditLog. # noqa: E501 + + + :return: The entity_id of this AuditLog. # noqa: E501 + :rtype: EntityId + """ + return self._entity_id + + @entity_id.setter + def entity_id(self, entity_id): + """Sets the entity_id of this AuditLog. + + + :param entity_id: The entity_id of this AuditLog. # noqa: E501 + :type: EntityId + """ + + self._entity_id = entity_id + + @property + def entity_name(self): + """Gets the entity_name of this AuditLog. # noqa: E501 + + + :return: The entity_name of this AuditLog. # noqa: E501 + :rtype: str + """ + return self._entity_name + + @entity_name.setter + def entity_name(self, entity_name): + """Sets the entity_name of this AuditLog. + + + :param entity_name: The entity_name of this AuditLog. # noqa: E501 + :type: str + """ + + self._entity_name = entity_name + + @property + def id(self): + """Gets the id of this AuditLog. # noqa: E501 + + + :return: The id of this AuditLog. # noqa: E501 + :rtype: AuditLogId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AuditLog. + + + :param id: The id of this AuditLog. # noqa: E501 + :type: AuditLogId + """ + + self._id = id + + @property + def tenant_id(self): + """Gets the tenant_id of this AuditLog. # noqa: E501 + + + :return: The tenant_id of this AuditLog. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this AuditLog. + + + :param tenant_id: The tenant_id of this AuditLog. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def user_id(self): + """Gets the user_id of this AuditLog. # noqa: E501 + + + :return: The user_id of this AuditLog. # noqa: E501 + :rtype: UserId + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this AuditLog. + + + :param user_id: The user_id of this AuditLog. # noqa: E501 + :type: UserId + """ + + self._user_id = user_id + + @property + def user_name(self): + """Gets the user_name of this AuditLog. # noqa: E501 + + + :return: The user_name of this AuditLog. # noqa: E501 + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this AuditLog. + + + :param user_name: The user_name of this AuditLog. # noqa: E501 + :type: str + """ + + self._user_name = user_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(AuditLog, 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, AuditLog): + 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/blob_entity_id.py b/tb_rest_client/models/models_pe/blob_entity_id.py new file mode 100644 index 00000000..2b625e2f --- /dev/null +++ b/tb_rest_client/models/models_pe/blob_entity_id.py @@ -0,0 +1,110 @@ +# 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 BlobEntityId(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 + """BlobEntityId - a model defined in Swagger""" # noqa: E501 + self._id = None + self.discriminator = None + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this BlobEntityId. # noqa: E501 + + + :return: The id of this BlobEntityId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BlobEntityId. + + + :param id: The id of this BlobEntityId. # noqa: E501 + :type: str + """ + + 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(BlobEntityId, 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, BlobEntityId): + 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/blob_entity_info.py b/tb_rest_client/models/models_pe/blob_entity_info.py index 9609696e..cfedf1dd 100644 --- a/tb_rest_client/models/models_pe/blob_entity_info.py +++ b/tb_rest_client/models/models_pe/blob_entity_info.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 BlobEntityInfo(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 @@ -38,6 +34,7 @@ class BlobEntityInfo(object): 'customer_id': 'CustomerId', 'id': 'BlobEntityId', 'name': 'str', + 'owner_id': 'EntityId', 'tenant_id': 'TenantId', 'type': 'str' } @@ -49,23 +46,23 @@ class BlobEntityInfo(object): 'customer_id': 'customerId', 'id': 'id', 'name': 'name', + 'owner_id': 'ownerId', 'tenant_id': 'tenantId', 'type': 'type' } - def __init__(self, additional_info=None, content_type=None, created_time=None, customer_id=None, id=None, name=None, tenant_id=None, type=None): # noqa: E501 + def __init__(self, additional_info=None, content_type=None, created_time=None, customer_id=None, id=None, name=None, owner_id=None, tenant_id=None, type=None): # noqa: E501 """BlobEntityInfo - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._content_type = None self._created_time = None self._customer_id = None self._id = None self._name = None + self._owner_id = None self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if content_type is not None: @@ -78,6 +75,8 @@ def __init__(self, additional_info=None, content_type=None, created_time=None, c self.id = id if name is not None: self.name = name + if owner_id is not None: + self.owner_id = owner_id if tenant_id is not None: self.tenant_id = tenant_id if type is not None: @@ -209,6 +208,27 @@ def name(self, name): self._name = name + @property + def owner_id(self): + """Gets the owner_id of this BlobEntityInfo. # noqa: E501 + + + :return: The owner_id of this BlobEntityInfo. # noqa: E501 + :rtype: EntityId + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this BlobEntityInfo. + + + :param owner_id: The owner_id of this BlobEntityInfo. # noqa: E501 + :type: EntityId + """ + + self._owner_id = owner_id + @property def tenant_id(self): """Gets the tenant_id of this BlobEntityInfo. # noqa: E501 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 c9cb1eb4..1234f38b 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 BlobEntityWithCustomerInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -40,6 +36,7 @@ class BlobEntityWithCustomerInfo(object): 'customer_title': 'str', 'id': 'BlobEntityId', 'name': 'str', + 'owner_id': 'EntityId', 'tenant_id': 'TenantId', 'type': 'str' } @@ -53,13 +50,13 @@ class BlobEntityWithCustomerInfo(object): 'customer_title': 'customerTitle', 'id': 'id', 'name': 'name', + 'owner_id': 'ownerId', 'tenant_id': 'tenantId', 'type': 'type' } - def __init__(self, additional_info=None, content_type=None, created_time=None, customer_id=None, customer_is_public=None, customer_title=None, id=None, name=None, tenant_id=None, type=None): # noqa: E501 + def __init__(self, additional_info=None, content_type=None, created_time=None, customer_id=None, customer_is_public=None, customer_title=None, id=None, name=None, owner_id=None, tenant_id=None, type=None): # noqa: E501 """BlobEntityWithCustomerInfo - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._content_type = None self._created_time = None @@ -68,10 +65,10 @@ def __init__(self, additional_info=None, content_type=None, created_time=None, c self._customer_title = None self._id = None self._name = None + self._owner_id = None self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if content_type is not None: @@ -88,6 +85,8 @@ def __init__(self, additional_info=None, content_type=None, created_time=None, c self.id = id if name is not None: self.name = name + if owner_id is not None: + self.owner_id = owner_id if tenant_id is not None: self.tenant_id = tenant_id if type is not None: @@ -261,6 +260,27 @@ def name(self, name): self._name = name + @property + def owner_id(self): + """Gets the owner_id of this BlobEntityWithCustomerInfo. # noqa: E501 + + + :return: The owner_id of this BlobEntityWithCustomerInfo. # noqa: E501 + :rtype: EntityId + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this BlobEntityWithCustomerInfo. + + + :param owner_id: The owner_id of this BlobEntityWithCustomerInfo. # noqa: E501 + :type: EntityId + """ + + self._owner_id = owner_id + @property def tenant_id(self): """Gets the tenant_id of this BlobEntityWithCustomerInfo. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/client_registration_dto.py b/tb_rest_client/models/models_pe/client_registration_dto.py new file mode 100644 index 00000000..42ccef82 --- /dev/null +++ b/tb_rest_client/models/models_pe/client_registration_dto.py @@ -0,0 +1,422 @@ +# 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 ClientRegistrationDto(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 = { + 'access_token_uri': 'str', + 'additional_info': 'str', + 'authorization_uri': 'str', + 'client_authentication_method': 'str', + 'client_id': 'str', + 'client_secret': 'str', + 'jwk_set_uri': 'str', + 'login_button_icon': 'str', + 'login_button_label': 'str', + 'mapper_config': 'OAuth2MapperConfig', + 'scope': 'list[str]', + 'user_info_uri': 'str', + 'user_name_attribute_name': 'str' + } + + attribute_map = { + 'access_token_uri': 'accessTokenUri', + 'additional_info': 'additionalInfo', + 'authorization_uri': 'authorizationUri', + 'client_authentication_method': 'clientAuthenticationMethod', + 'client_id': 'clientId', + 'client_secret': 'clientSecret', + 'jwk_set_uri': 'jwkSetUri', + 'login_button_icon': 'loginButtonIcon', + 'login_button_label': 'loginButtonLabel', + 'mapper_config': 'mapperConfig', + 'scope': 'scope', + 'user_info_uri': 'userInfoUri', + 'user_name_attribute_name': 'userNameAttributeName' + } + + def __init__(self, access_token_uri=None, additional_info=None, authorization_uri=None, client_authentication_method=None, client_id=None, client_secret=None, jwk_set_uri=None, login_button_icon=None, login_button_label=None, mapper_config=None, scope=None, user_info_uri=None, user_name_attribute_name=None): # noqa: E501 + """ClientRegistrationDto - a model defined in Swagger""" # noqa: E501 + self._access_token_uri = None + self._additional_info = None + self._authorization_uri = None + self._client_authentication_method = None + self._client_id = None + self._client_secret = None + self._jwk_set_uri = None + self._login_button_icon = None + self._login_button_label = None + self._mapper_config = None + self._scope = None + self._user_info_uri = None + self._user_name_attribute_name = None + self.discriminator = None + if access_token_uri is not None: + self.access_token_uri = access_token_uri + if additional_info is not None: + self.additional_info = additional_info + if authorization_uri is not None: + self.authorization_uri = authorization_uri + if client_authentication_method is not None: + self.client_authentication_method = client_authentication_method + if client_id is not None: + self.client_id = client_id + if client_secret is not None: + self.client_secret = client_secret + if jwk_set_uri is not None: + self.jwk_set_uri = jwk_set_uri + if login_button_icon is not None: + self.login_button_icon = login_button_icon + if login_button_label is not None: + self.login_button_label = login_button_label + if mapper_config is not None: + self.mapper_config = mapper_config + if scope is not None: + self.scope = scope + if user_info_uri is not None: + self.user_info_uri = user_info_uri + if user_name_attribute_name is not None: + self.user_name_attribute_name = user_name_attribute_name + + @property + def access_token_uri(self): + """Gets the access_token_uri of this ClientRegistrationDto. # noqa: E501 + + + :return: The access_token_uri of this ClientRegistrationDto. # noqa: E501 + :rtype: str + """ + return self._access_token_uri + + @access_token_uri.setter + def access_token_uri(self, access_token_uri): + """Sets the access_token_uri of this ClientRegistrationDto. + + + :param access_token_uri: The access_token_uri of this ClientRegistrationDto. # noqa: E501 + :type: str + """ + + self._access_token_uri = access_token_uri + + @property + def additional_info(self): + """Gets the additional_info of this ClientRegistrationDto. # noqa: E501 + + + :return: The additional_info of this ClientRegistrationDto. # noqa: E501 + :rtype: str + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this ClientRegistrationDto. + + + :param additional_info: The additional_info of this ClientRegistrationDto. # noqa: E501 + :type: str + """ + + self._additional_info = additional_info + + @property + def authorization_uri(self): + """Gets the authorization_uri of this ClientRegistrationDto. # noqa: E501 + + + :return: The authorization_uri of this ClientRegistrationDto. # noqa: E501 + :rtype: str + """ + return self._authorization_uri + + @authorization_uri.setter + def authorization_uri(self, authorization_uri): + """Sets the authorization_uri of this ClientRegistrationDto. + + + :param authorization_uri: The authorization_uri of this ClientRegistrationDto. # noqa: E501 + :type: str + """ + + self._authorization_uri = authorization_uri + + @property + def client_authentication_method(self): + """Gets the client_authentication_method of this ClientRegistrationDto. # noqa: E501 + + + :return: The client_authentication_method of this ClientRegistrationDto. # noqa: E501 + :rtype: str + """ + return self._client_authentication_method + + @client_authentication_method.setter + def client_authentication_method(self, client_authentication_method): + """Sets the client_authentication_method of this ClientRegistrationDto. + + + :param client_authentication_method: The client_authentication_method of this ClientRegistrationDto. # noqa: E501 + :type: str + """ + + self._client_authentication_method = client_authentication_method + + @property + def client_id(self): + """Gets the client_id of this ClientRegistrationDto. # noqa: E501 + + + :return: The client_id of this ClientRegistrationDto. # noqa: E501 + :rtype: str + """ + return self._client_id + + @client_id.setter + def client_id(self, client_id): + """Sets the client_id of this ClientRegistrationDto. + + + :param client_id: The client_id of this ClientRegistrationDto. # noqa: E501 + :type: str + """ + + self._client_id = client_id + + @property + def client_secret(self): + """Gets the client_secret of this ClientRegistrationDto. # noqa: E501 + + + :return: The client_secret of this ClientRegistrationDto. # noqa: E501 + :rtype: str + """ + return self._client_secret + + @client_secret.setter + def client_secret(self, client_secret): + """Sets the client_secret of this ClientRegistrationDto. + + + :param client_secret: The client_secret of this ClientRegistrationDto. # noqa: E501 + :type: str + """ + + self._client_secret = client_secret + + @property + def jwk_set_uri(self): + """Gets the jwk_set_uri of this ClientRegistrationDto. # noqa: E501 + + + :return: The jwk_set_uri of this ClientRegistrationDto. # noqa: E501 + :rtype: str + """ + return self._jwk_set_uri + + @jwk_set_uri.setter + def jwk_set_uri(self, jwk_set_uri): + """Sets the jwk_set_uri of this ClientRegistrationDto. + + + :param jwk_set_uri: The jwk_set_uri of this ClientRegistrationDto. # noqa: E501 + :type: str + """ + + self._jwk_set_uri = jwk_set_uri + + @property + def login_button_icon(self): + """Gets the login_button_icon of this ClientRegistrationDto. # noqa: E501 + + + :return: The login_button_icon of this ClientRegistrationDto. # noqa: E501 + :rtype: str + """ + return self._login_button_icon + + @login_button_icon.setter + def login_button_icon(self, login_button_icon): + """Sets the login_button_icon of this ClientRegistrationDto. + + + :param login_button_icon: The login_button_icon of this ClientRegistrationDto. # noqa: E501 + :type: str + """ + + self._login_button_icon = login_button_icon + + @property + def login_button_label(self): + """Gets the login_button_label of this ClientRegistrationDto. # noqa: E501 + + + :return: The login_button_label of this ClientRegistrationDto. # noqa: E501 + :rtype: str + """ + return self._login_button_label + + @login_button_label.setter + def login_button_label(self, login_button_label): + """Sets the login_button_label of this ClientRegistrationDto. + + + :param login_button_label: The login_button_label of this ClientRegistrationDto. # noqa: E501 + :type: str + """ + + self._login_button_label = login_button_label + + @property + def mapper_config(self): + """Gets the mapper_config of this ClientRegistrationDto. # noqa: E501 + + + :return: The mapper_config of this ClientRegistrationDto. # noqa: E501 + :rtype: OAuth2MapperConfig + """ + return self._mapper_config + + @mapper_config.setter + def mapper_config(self, mapper_config): + """Sets the mapper_config of this ClientRegistrationDto. + + + :param mapper_config: The mapper_config of this ClientRegistrationDto. # noqa: E501 + :type: OAuth2MapperConfig + """ + + self._mapper_config = mapper_config + + @property + def scope(self): + """Gets the scope of this ClientRegistrationDto. # noqa: E501 + + + :return: The scope of this ClientRegistrationDto. # noqa: E501 + :rtype: list[str] + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this ClientRegistrationDto. + + + :param scope: The scope of this ClientRegistrationDto. # noqa: E501 + :type: list[str] + """ + + self._scope = scope + + @property + def user_info_uri(self): + """Gets the user_info_uri of this ClientRegistrationDto. # noqa: E501 + + + :return: The user_info_uri of this ClientRegistrationDto. # noqa: E501 + :rtype: str + """ + return self._user_info_uri + + @user_info_uri.setter + def user_info_uri(self, user_info_uri): + """Sets the user_info_uri of this ClientRegistrationDto. + + + :param user_info_uri: The user_info_uri of this ClientRegistrationDto. # noqa: E501 + :type: str + """ + + self._user_info_uri = user_info_uri + + @property + def user_name_attribute_name(self): + """Gets the user_name_attribute_name of this ClientRegistrationDto. # noqa: E501 + + + :return: The user_name_attribute_name of this ClientRegistrationDto. # noqa: E501 + :rtype: str + """ + return self._user_name_attribute_name + + @user_name_attribute_name.setter + def user_name_attribute_name(self, user_name_attribute_name): + """Sets the user_name_attribute_name of this ClientRegistrationDto. + + + :param user_name_attribute_name: The user_name_attribute_name of this ClientRegistrationDto. # noqa: E501 + :type: str + """ + + self._user_name_attribute_name = user_name_attribute_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(ClientRegistrationDto, 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, ClientRegistrationDto): + 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/component_descriptor.py b/tb_rest_client/models/models_pe/component_descriptor.py index ecbb5ec8..26926a6f 100644 --- a/tb_rest_client/models/models_pe/component_descriptor.py +++ b/tb_rest_client/models/models_pe/component_descriptor.py @@ -1,33 +1,235 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 -from tb_rest_client.models.models_ce import ComponentDescriptor +class ComponentDescriptor(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 = { + 'actions': 'str', + 'clazz': 'str', + 'configuration_descriptor': 'str', + 'created_time': 'int', + 'id': 'ComponentDescriptorId', + 'name': 'str', + 'scope': 'str', + 'type': 'str' + } + + attribute_map = { + 'actions': 'actions', + 'clazz': 'clazz', + 'configuration_descriptor': 'configurationDescriptor', + 'created_time': 'createdTime', + 'id': 'id', + 'name': 'name', + 'scope': 'scope', + 'type': 'type' + } -class ComponentDescriptor(ComponentDescriptor): def __init__(self, actions=None, clazz=None, configuration_descriptor=None, created_time=None, id=None, name=None, scope=None, type=None): # noqa: E501 - super().__init(actions, clazz, configuration_descriptor, created_time, id, name, scope, type) + """ComponentDescriptor - a model defined in Swagger""" # noqa: E501 + self._actions = None + self._clazz = None + self._configuration_descriptor = None + self._created_time = None + self._id = None + self._name = None + self._scope = None self._type = None + self.discriminator = None + if actions is not None: + self.actions = actions + if clazz is not None: + self.clazz = clazz + if configuration_descriptor is not None: + self.configuration_descriptor = configuration_descriptor + 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 + if scope is not None: + self.scope = scope if type is not None: self.type = type + @property + def actions(self): + """Gets the actions of this ComponentDescriptor. # noqa: E501 + + + :return: The actions of this ComponentDescriptor. # noqa: E501 + :rtype: str + """ + return self._actions + + @actions.setter + def actions(self, actions): + """Sets the actions of this ComponentDescriptor. + + + :param actions: The actions of this ComponentDescriptor. # noqa: E501 + :type: str + """ + + self._actions = actions + + @property + def clazz(self): + """Gets the clazz of this ComponentDescriptor. # noqa: E501 + + + :return: The clazz of this ComponentDescriptor. # noqa: E501 + :rtype: str + """ + return self._clazz + + @clazz.setter + def clazz(self, clazz): + """Sets the clazz of this ComponentDescriptor. + + + :param clazz: The clazz of this ComponentDescriptor. # noqa: E501 + :type: str + """ + + self._clazz = clazz + + @property + def configuration_descriptor(self): + """Gets the configuration_descriptor of this ComponentDescriptor. # noqa: E501 + + + :return: The configuration_descriptor of this ComponentDescriptor. # noqa: E501 + :rtype: str + """ + return self._configuration_descriptor + + @configuration_descriptor.setter + def configuration_descriptor(self, configuration_descriptor): + """Sets the configuration_descriptor of this ComponentDescriptor. + + + :param configuration_descriptor: The configuration_descriptor of this ComponentDescriptor. # noqa: E501 + :type: str + """ + + self._configuration_descriptor = configuration_descriptor + + @property + def created_time(self): + """Gets the created_time of this ComponentDescriptor. # noqa: E501 + + + :return: The created_time of this ComponentDescriptor. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this ComponentDescriptor. + + + :param created_time: The created_time of this ComponentDescriptor. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def id(self): + """Gets the id of this ComponentDescriptor. # noqa: E501 + + + :return: The id of this ComponentDescriptor. # noqa: E501 + :rtype: ComponentDescriptorId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ComponentDescriptor. + + + :param id: The id of this ComponentDescriptor. # noqa: E501 + :type: ComponentDescriptorId + """ + + self._id = id + + @property + def name(self): + """Gets the name of this ComponentDescriptor. # noqa: E501 + + + :return: The name of this ComponentDescriptor. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ComponentDescriptor. + + + :param name: The name of this ComponentDescriptor. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def scope(self): + """Gets the scope of this ComponentDescriptor. # noqa: E501 + + + :return: The scope of this ComponentDescriptor. # noqa: E501 + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this ComponentDescriptor. + + + :param scope: The scope of this ComponentDescriptor. # noqa: E501 + :type: str + """ + allowed_values = ["SYSTEM", "TENANT"] # 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 type(self): """Gets the type of this ComponentDescriptor. # noqa: E501 @@ -54,3 +256,49 @@ def type(self, type): ) 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(ComponentDescriptor, 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, ComponentDescriptor): + 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/contact_basedobject.py b/tb_rest_client/models/models_pe/contact_basedobject.py index 37392941..b736c4d8 100644 --- a/tb_rest_client/models/models_pe/contact_basedobject.py +++ b/tb_rest_client/models/models_pe/contact_basedobject.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 ContactBasedobject(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 @@ -63,7 +59,6 @@ class ContactBasedobject(object): 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 self._address2 = None @@ -77,7 +72,6 @@ def __init__(self, additional_info=None, address=None, address2=None, city=None, self._state = None self._zip = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if address is not None: diff --git a/tb_rest_client/models/models_pe/converter.py b/tb_rest_client/models/models_pe/converter.py index de759928..6b83f6c6 100644 --- a/tb_rest_client/models/models_pe/converter.py +++ b/tb_rest_client/models/models_pe/converter.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Converter(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 @@ -55,7 +51,6 @@ class Converter(object): def __init__(self, additional_info=None, configuration=None, created_time=None, debug_mode=None, id=None, name=None, tenant_id=None, type=None): # noqa: E501 """Converter - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._configuration = None self._created_time = None @@ -65,7 +60,6 @@ def __init__(self, additional_info=None, configuration=None, created_time=None, self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if configuration is not None: diff --git a/tb_rest_client/models/models_pe/converter_id.py b/tb_rest_client/models/models_pe/converter_id.py new file mode 100644 index 00000000..9eddd6de --- /dev/null +++ b/tb_rest_client/models/models_pe/converter_id.py @@ -0,0 +1,111 @@ +# 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 ConverterId(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 + """ConverterId - 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 ConverterId. # noqa: E501 + + + :return: The id of this ConverterId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ConverterId. + + + :param id: The id of this ConverterId. # 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(ConverterId, 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, ConverterId): + 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/custom_menu.py b/tb_rest_client/models/models_pe/custom_menu.py index aef5e0c7..77d075d2 100644 --- a/tb_rest_client/models/models_pe/custom_menu.py +++ b/tb_rest_client/models/models_pe/custom_menu.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 CustomMenu(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 @@ -43,11 +39,9 @@ class CustomMenu(object): def __init__(self, disabled_menu_items=None, menu_items=None): # noqa: E501 """CustomMenu - a model defined in Swagger""" # noqa: E501 - self._disabled_menu_items = None self._menu_items = None self.discriminator = None - if disabled_menu_items is not None: self.disabled_menu_items = disabled_menu_items if menu_items is not None: 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 ffd11dfa..00e8b134 100644 --- a/tb_rest_client/models/models_pe/custom_menu_item.py +++ b/tb_rest_client/models/models_pe/custom_menu_item.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 CustomMenuItem(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -33,6 +29,8 @@ class CustomMenuItem(object): """ swagger_types = { 'child_menu_items': 'list[CustomMenuItem]', + 'dashboard_id': 'str', + 'hide_dashboard_toolbar': 'bool', 'icon_url': 'str', 'iframe_url': 'str', 'material_icon': 'str', @@ -42,6 +40,8 @@ class CustomMenuItem(object): attribute_map = { 'child_menu_items': 'childMenuItems', + 'dashboard_id': 'dashboardId', + 'hide_dashboard_toolbar': 'hideDashboardToolbar', 'icon_url': 'iconUrl', 'iframe_url': 'iframeUrl', 'material_icon': 'materialIcon', @@ -49,19 +49,23 @@ class CustomMenuItem(object): 'set_access_token': 'setAccessToken' } - def __init__(self, child_menu_items=None, icon_url=None, iframe_url=None, material_icon=None, name=None, set_access_token=None): # noqa: E501 + def __init__(self, child_menu_items=None, dashboard_id=None, hide_dashboard_toolbar=None, icon_url=None, iframe_url=None, material_icon=None, name=None, set_access_token=None): # noqa: E501 """CustomMenuItem - a model defined in Swagger""" # noqa: E501 - self._child_menu_items = None + self._dashboard_id = None + self._hide_dashboard_toolbar = None self._icon_url = None self._iframe_url = None self._material_icon = None self._name = None self._set_access_token = None self.discriminator = None - if child_menu_items is not None: self.child_menu_items = child_menu_items + 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 if icon_url is not None: self.icon_url = icon_url if iframe_url is not None: @@ -94,6 +98,48 @@ def child_menu_items(self, child_menu_items): self._child_menu_items = child_menu_items + @property + def dashboard_id(self): + """Gets the dashboard_id of this CustomMenuItem. # noqa: E501 + + + :return: The dashboard_id of this CustomMenuItem. # noqa: E501 + :rtype: str + """ + return self._dashboard_id + + @dashboard_id.setter + def dashboard_id(self, dashboard_id): + """Sets the dashboard_id of this CustomMenuItem. + + + :param dashboard_id: The dashboard_id of this CustomMenuItem. # noqa: E501 + :type: str + """ + + self._dashboard_id = dashboard_id + + @property + def hide_dashboard_toolbar(self): + """Gets the hide_dashboard_toolbar of this CustomMenuItem. # noqa: E501 + + + :return: The hide_dashboard_toolbar of this CustomMenuItem. # 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 CustomMenuItem. + + + :param hide_dashboard_toolbar: The hide_dashboard_toolbar of this CustomMenuItem. # noqa: E501 + :type: bool + """ + + self._hide_dashboard_toolbar = hide_dashboard_toolbar + @property def icon_url(self): """Gets the icon_url of this CustomMenuItem. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/custom_translation.py b/tb_rest_client/models/models_pe/custom_translation.py index 7fea491e..ea01fe50 100644 --- a/tb_rest_client/models/models_pe/custom_translation.py +++ b/tb_rest_client/models/models_pe/custom_translation.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 CustomTranslation(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 @@ -41,10 +37,8 @@ class CustomTranslation(object): def __init__(self, translation_map=None): # noqa: E501 """CustomTranslation - a model defined in Swagger""" # noqa: E501 - self._translation_map = None self.discriminator = None - if translation_map is not None: self.translation_map = translation_map diff --git a/tb_rest_client/models/models_pe/customer.py b/tb_rest_client/models/models_pe/customer.py index 3bceff32..77d2484a 100644 --- a/tb_rest_client/models/models_pe/customer.py +++ b/tb_rest_client/models/models_pe/customer.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Customer(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -73,7 +69,6 @@ class Customer(object): def __init__(self, additional_info=None, address=None, address2=None, city=None, country=None, created_time=None, customer_id=None, email=None, id=None, name=None, owner_id=None, parent_customer_id=None, phone=None, state=None, tenant_id=None, title=None, zip=None): # noqa: E501 """Customer - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._address = None self._address2 = None @@ -92,7 +87,6 @@ def __init__(self, additional_info=None, address=None, address2=None, city=None, self._title = None self._zip = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if address is not None: diff --git a/tb_rest_client/models/models_pe/dashboard.py b/tb_rest_client/models/models_pe/dashboard.py index 20fcb31b..f8537f74 100644 --- a/tb_rest_client/models/models_pe/dashboard.py +++ b/tb_rest_client/models/models_pe/dashboard.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Dashboard(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -37,6 +33,9 @@ class Dashboard(object): 'created_time': 'int', 'customer_id': 'CustomerId', 'id': 'DashboardId', + 'image': 'str', + 'mobile_hide': 'bool', + 'mobile_order': 'int', 'name': 'str', 'owner_id': 'EntityId', 'tenant_id': 'TenantId', @@ -49,26 +48,30 @@ class Dashboard(object): 'created_time': 'createdTime', 'customer_id': 'customerId', 'id': 'id', + 'image': 'image', + 'mobile_hide': 'mobileHide', + 'mobile_order': 'mobileOrder', 'name': 'name', 'owner_id': 'ownerId', 'tenant_id': 'tenantId', 'title': 'title' } - def __init__(self, assigned_customers=None, configuration=None, created_time=None, customer_id=None, id=None, name=None, owner_id=None, tenant_id=None, title=None): # noqa: E501 + def __init__(self, assigned_customers=None, configuration=None, created_time=None, customer_id=None, id=None, image=None, mobile_hide=None, mobile_order=None, name=None, owner_id=None, tenant_id=None, title=None): # noqa: E501 """Dashboard - a model defined in Swagger""" # noqa: E501 - self._assigned_customers = None self._configuration = None self._created_time = None self._customer_id = None self._id = None + self._image = None + self._mobile_hide = None + self._mobile_order = None self._name = None self._owner_id = None self._tenant_id = None self._title = None self.discriminator = None - if assigned_customers is not None: self.assigned_customers = assigned_customers if configuration is not None: @@ -79,6 +82,12 @@ def __init__(self, assigned_customers=None, configuration=None, created_time=Non self.customer_id = customer_id if id is not None: self.id = id + if image is not None: + self.image = image + if mobile_hide is not None: + self.mobile_hide = mobile_hide + if mobile_order is not None: + self.mobile_order = mobile_order if name is not None: self.name = name if owner_id is not None: @@ -193,6 +202,69 @@ def id(self, id): self._id = id + @property + def image(self): + """Gets the image of this Dashboard. # noqa: E501 + + + :return: The image of this Dashboard. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this Dashboard. + + + :param image: The image of this Dashboard. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def mobile_hide(self): + """Gets the mobile_hide of this Dashboard. # noqa: E501 + + + :return: The mobile_hide of this Dashboard. # noqa: E501 + :rtype: bool + """ + return self._mobile_hide + + @mobile_hide.setter + def mobile_hide(self, mobile_hide): + """Sets the mobile_hide of this Dashboard. + + + :param mobile_hide: The mobile_hide of this Dashboard. # noqa: E501 + :type: bool + """ + + self._mobile_hide = mobile_hide + + @property + def mobile_order(self): + """Gets the mobile_order of this Dashboard. # noqa: E501 + + + :return: The mobile_order of this Dashboard. # noqa: E501 + :rtype: int + """ + return self._mobile_order + + @mobile_order.setter + def mobile_order(self, mobile_order): + """Sets the mobile_order of this Dashboard. + + + :param mobile_order: The mobile_order of this Dashboard. # noqa: E501 + :type: int + """ + + self._mobile_order = mobile_order + @property def name(self): """Gets the name of this Dashboard. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/dashboard_info.py b/tb_rest_client/models/models_pe/dashboard_info.py index be54e7df..87e2cdee 100644 --- a/tb_rest_client/models/models_pe/dashboard_info.py +++ b/tb_rest_client/models/models_pe/dashboard_info.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 DashboardInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -35,6 +31,9 @@ class DashboardInfo(object): 'assigned_customers': 'list[ShortCustomerInfo]', 'created_time': 'int', 'customer_id': 'CustomerId', + 'image': 'str', + 'mobile_hide': 'bool', + 'mobile_order': 'int', 'name': 'str', 'owner_id': 'EntityId', 'tenant_id': 'TenantId', @@ -45,30 +44,40 @@ class DashboardInfo(object): 'assigned_customers': 'assignedCustomers', 'created_time': 'createdTime', 'customer_id': 'customerId', + 'image': 'image', + 'mobile_hide': 'mobileHide', + 'mobile_order': 'mobileOrder', 'name': 'name', 'owner_id': 'ownerId', 'tenant_id': 'tenantId', 'title': 'title' } - def __init__(self, assigned_customers=None, created_time=None, customer_id=None, name=None, owner_id=None, tenant_id=None, title=None): # noqa: E501 + def __init__(self, assigned_customers=None, created_time=None, customer_id=None, image=None, mobile_hide=None, mobile_order=None, name=None, owner_id=None, tenant_id=None, title=None): # noqa: E501 """DashboardInfo - a model defined in Swagger""" # noqa: E501 - self._assigned_customers = None self._created_time = None self._customer_id = None + self._image = None + self._mobile_hide = None + self._mobile_order = None self._name = None self._owner_id = None self._tenant_id = None self._title = None self.discriminator = None - if assigned_customers is not None: self.assigned_customers = assigned_customers if created_time is not None: self.created_time = created_time if customer_id is not None: self.customer_id = customer_id + if image is not None: + self.image = image + if mobile_hide is not None: + self.mobile_hide = mobile_hide + if mobile_order is not None: + self.mobile_order = mobile_order if name is not None: self.name = name if owner_id is not None: @@ -141,6 +150,69 @@ def customer_id(self, customer_id): self._customer_id = customer_id + @property + def image(self): + """Gets the image of this DashboardInfo. # noqa: E501 + + + :return: The image of this DashboardInfo. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this DashboardInfo. + + + :param image: The image of this DashboardInfo. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def mobile_hide(self): + """Gets the mobile_hide of this DashboardInfo. # noqa: E501 + + + :return: The mobile_hide of this DashboardInfo. # noqa: E501 + :rtype: bool + """ + return self._mobile_hide + + @mobile_hide.setter + def mobile_hide(self, mobile_hide): + """Sets the mobile_hide of this DashboardInfo. + + + :param mobile_hide: The mobile_hide of this DashboardInfo. # noqa: E501 + :type: bool + """ + + self._mobile_hide = mobile_hide + + @property + def mobile_order(self): + """Gets the mobile_order of this DashboardInfo. # noqa: E501 + + + :return: The mobile_order of this DashboardInfo. # noqa: E501 + :rtype: int + """ + return self._mobile_order + + @mobile_order.setter + def mobile_order(self, mobile_order): + """Sets the mobile_order of this DashboardInfo. + + + :param mobile_order: The mobile_order of this DashboardInfo. # noqa: E501 + :type: int + """ + + self._mobile_order = mobile_order + @property def name(self): """Gets the name of this DashboardInfo. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/delete_tenant_request.py b/tb_rest_client/models/models_pe/delete_tenant_request.py new file mode 100644 index 00000000..0d639e86 --- /dev/null +++ b/tb_rest_client/models/models_pe/delete_tenant_request.py @@ -0,0 +1,136 @@ +# 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 DeleteTenantRequest(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_notes': 'str', + 'reason': 'str' + } + + attribute_map = { + 'additional_notes': 'additionalNotes', + 'reason': 'reason' + } + + def __init__(self, additional_notes=None, reason=None): # noqa: E501 + """DeleteTenantRequest - a model defined in Swagger""" # noqa: E501 + self._additional_notes = None + self._reason = None + self.discriminator = None + if additional_notes is not None: + self.additional_notes = additional_notes + if reason is not None: + self.reason = reason + + @property + def additional_notes(self): + """Gets the additional_notes of this DeleteTenantRequest. # noqa: E501 + + + :return: The additional_notes of this DeleteTenantRequest. # noqa: E501 + :rtype: str + """ + return self._additional_notes + + @additional_notes.setter + def additional_notes(self, additional_notes): + """Sets the additional_notes of this DeleteTenantRequest. + + + :param additional_notes: The additional_notes of this DeleteTenantRequest. # noqa: E501 + :type: str + """ + + self._additional_notes = additional_notes + + @property + def reason(self): + """Gets the reason of this DeleteTenantRequest. # noqa: E501 + + + :return: The reason of this DeleteTenantRequest. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this DeleteTenantRequest. + + + :param reason: The reason of this DeleteTenantRequest. # noqa: E501 + :type: str + """ + + self._reason = reason + + 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(DeleteTenantRequest, 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, DeleteTenantRequest): + 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 c534f91f..a2b12196 100644 --- a/tb_rest_client/models/models_pe/device.py +++ b/tb_rest_client/models/models_pe/device.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Device(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -35,10 +31,13 @@ class Device(object): 'additional_info': 'str', 'created_time': 'int', 'customer_id': 'CustomerId', - 'id': 'DeviceId', + 'device_data': 'DeviceData', + 'device_profile_id': 'DeviceProfileId', + 'firmware_id': 'OtaPackageId', 'label': 'str', 'name': 'str', 'owner_id': 'EntityId', + 'software_id': 'OtaPackageId', 'tenant_id': 'TenantId', 'type': 'str' } @@ -47,42 +46,52 @@ class Device(object): 'additional_info': 'additionalInfo', 'created_time': 'createdTime', 'customer_id': 'customerId', - 'id': 'id', + 'device_data': 'deviceData', + 'device_profile_id': 'deviceProfileId', + 'firmware_id': 'firmwareId', 'label': 'label', 'name': 'name', 'owner_id': 'ownerId', + 'software_id': 'softwareId', 'tenant_id': 'tenantId', 'type': 'type' } - def __init__(self, additional_info=None, created_time=None, customer_id=None, id=None, label=None, name=None, owner_id=None, tenant_id=None, type=None): # noqa: E501 + def __init__(self, additional_info=None, created_time=None, customer_id=None, device_data=None, device_profile_id=None, firmware_id=None, label=None, name=None, owner_id=None, software_id=None, tenant_id=None, type=None): # noqa: E501 """Device - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._created_time = None self._customer_id = None - self._id = None + self._device_data = None + self._device_profile_id = None + self._firmware_id = None self._label = None self._name = None self._owner_id = None + self._software_id = None self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if created_time is not None: self.created_time = created_time if customer_id is not None: self.customer_id = customer_id - if id is not None: - self.id = id + if device_data is not None: + self.device_data = device_data + if device_profile_id is not None: + self.device_profile_id = device_profile_id + if firmware_id is not None: + self.firmware_id = firmware_id if label is not None: self.label = label if name is not None: self.name = name if owner_id is not None: self.owner_id = owner_id + if software_id is not None: + self.software_id = software_id if tenant_id is not None: self.tenant_id = tenant_id if type is not None: @@ -152,25 +161,67 @@ def customer_id(self, customer_id): self._customer_id = customer_id @property - def id(self): - """Gets the id of this Device. # noqa: E501 + def device_data(self): + """Gets the device_data of this Device. # noqa: E501 + + + :return: The device_data of this Device. # noqa: E501 + :rtype: DeviceData + """ + return self._device_data + + @device_data.setter + def device_data(self, device_data): + """Sets the device_data of this Device. + + + :param device_data: The device_data of this Device. # noqa: E501 + :type: DeviceData + """ + + self._device_data = device_data + + @property + def device_profile_id(self): + """Gets the device_profile_id of this Device. # noqa: E501 + + + :return: The device_profile_id of this Device. # 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 Device. + + + :param device_profile_id: The device_profile_id of this Device. # noqa: E501 + :type: DeviceProfileId + """ + + self._device_profile_id = device_profile_id + + @property + def firmware_id(self): + """Gets the firmware_id of this Device. # noqa: E501 - :return: The id of this Device. # noqa: E501 - :rtype: DeviceId + :return: The firmware_id of this Device. # noqa: E501 + :rtype: OtaPackageId """ - return self._id + return self._firmware_id - @id.setter - def id(self, id): - """Sets the id of this Device. + @firmware_id.setter + def firmware_id(self, firmware_id): + """Sets the firmware_id of this Device. - :param id: The id of this Device. # noqa: E501 - :type: DeviceId + :param firmware_id: The firmware_id of this Device. # noqa: E501 + :type: OtaPackageId """ - self._id = id + self._firmware_id = firmware_id @property def label(self): @@ -235,6 +286,27 @@ def owner_id(self, owner_id): self._owner_id = owner_id + @property + def software_id(self): + """Gets the software_id of this Device. # noqa: E501 + + + :return: The software_id of this Device. # noqa: E501 + :rtype: OtaPackageId + """ + return self._software_id + + @software_id.setter + def software_id(self, software_id): + """Sets the software_id of this Device. + + + :param software_id: The software_id of this Device. # noqa: E501 + :type: OtaPackageId + """ + + self._software_id = software_id + @property def tenant_id(self): """Gets the tenant_id of this Device. # 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 new file mode 100644 index 00000000..80ded450 --- /dev/null +++ b/tb_rest_client/models/models_pe/device_group_ota_package.py @@ -0,0 +1,220 @@ +# 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 DeviceGroupOtaPackage(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 = { + 'group_id': 'EntityGroupId', + 'id': 'str', + 'ota_package_id': 'OtaPackageId', + 'ota_package_type': 'str', + 'ota_package_update_time': 'int' + } + + attribute_map = { + 'group_id': 'groupId', + 'id': 'id', + 'ota_package_id': 'otaPackageId', + 'ota_package_type': 'otaPackageType', + 'ota_package_update_time': 'otaPackageUpdateTime' + } + + def __init__(self, group_id=None, id=None, ota_package_id=None, ota_package_type=None, ota_package_update_time=None): # noqa: E501 + """DeviceGroupOtaPackage - a model defined in Swagger""" # noqa: E501 + self._group_id = None + self._id = None + self._ota_package_id = None + self._ota_package_type = None + self._ota_package_update_time = None + self.discriminator = None + if group_id is not None: + self.group_id = group_id + if id is not None: + self.id = id + if ota_package_id is not None: + self.ota_package_id = ota_package_id + if ota_package_type is not None: + self.ota_package_type = ota_package_type + if ota_package_update_time is not None: + self.ota_package_update_time = ota_package_update_time + + @property + def group_id(self): + """Gets the group_id of this DeviceGroupOtaPackage. # noqa: E501 + + + :return: The group_id of this DeviceGroupOtaPackage. # noqa: E501 + :rtype: EntityGroupId + """ + return self._group_id + + @group_id.setter + def group_id(self, group_id): + """Sets the group_id of this DeviceGroupOtaPackage. + + + :param group_id: The group_id of this DeviceGroupOtaPackage. # noqa: E501 + :type: EntityGroupId + """ + + self._group_id = group_id + + @property + def id(self): + """Gets the id of this DeviceGroupOtaPackage. # noqa: E501 + + + :return: The id of this DeviceGroupOtaPackage. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DeviceGroupOtaPackage. + + + :param id: The id of this DeviceGroupOtaPackage. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def ota_package_id(self): + """Gets the ota_package_id of this DeviceGroupOtaPackage. # noqa: E501 + + + :return: The ota_package_id of this DeviceGroupOtaPackage. # noqa: E501 + :rtype: OtaPackageId + """ + return self._ota_package_id + + @ota_package_id.setter + def ota_package_id(self, ota_package_id): + """Sets the ota_package_id of this DeviceGroupOtaPackage. + + + :param ota_package_id: The ota_package_id of this DeviceGroupOtaPackage. # noqa: E501 + :type: OtaPackageId + """ + + self._ota_package_id = ota_package_id + + @property + def ota_package_type(self): + """Gets the ota_package_type of this DeviceGroupOtaPackage. # noqa: E501 + + + :return: The ota_package_type of this DeviceGroupOtaPackage. # noqa: E501 + :rtype: str + """ + return self._ota_package_type + + @ota_package_type.setter + def ota_package_type(self, ota_package_type): + """Sets the ota_package_type of this DeviceGroupOtaPackage. + + + :param ota_package_type: The ota_package_type of this DeviceGroupOtaPackage. # noqa: E501 + :type: str + """ + allowed_values = ["FIRMWARE", "SOFTWARE"] # noqa: E501 + if ota_package_type not in allowed_values: + raise ValueError( + "Invalid value for `ota_package_type` ({0}), must be one of {1}" # noqa: E501 + .format(ota_package_type, allowed_values) + ) + + self._ota_package_type = ota_package_type + + @property + def ota_package_update_time(self): + """Gets the ota_package_update_time of this DeviceGroupOtaPackage. # noqa: E501 + + + :return: The ota_package_update_time of this DeviceGroupOtaPackage. # noqa: E501 + :rtype: int + """ + return self._ota_package_update_time + + @ota_package_update_time.setter + def ota_package_update_time(self, ota_package_update_time): + """Sets the ota_package_update_time of this DeviceGroupOtaPackage. + + + :param ota_package_update_time: The ota_package_update_time of this DeviceGroupOtaPackage. # noqa: E501 + :type: int + """ + + self._ota_package_update_time = ota_package_update_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(DeviceGroupOtaPackage, 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, DeviceGroupOtaPackage): + 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 similarity index 95% rename from tb_rest_client/models/models_pe/device-profile.py rename to tb_rest_client/models/models_pe/device_profile.py index 30c3310e..376502cf 100644 --- a/tb_rest_client/models/models_pe/device-profile.py +++ b/tb_rest_client/models/models_pe/device_profile.py @@ -1,15 +1,18 @@ # 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 -""" - +# Copyright 2020. ThingsBoard +# # +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# # +# http://www.apache.org/licenses/LICENSE-2.0 +# # +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import pprint import re # noqa: F401 @@ -451,4 +454,4 @@ def __ne__(self, other): if not isinstance(other, DeviceProfile): return True - return self.to_dict() != other.to_dict() \ No newline at end of file + return self.to_dict() != other.to_dict() diff --git a/tb_rest_client/models/models_pe/domain_info.py b/tb_rest_client/models/models_pe/domain_info.py new file mode 100644 index 00000000..f971a127 --- /dev/null +++ b/tb_rest_client/models/models_pe/domain_info.py @@ -0,0 +1,142 @@ +# 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 DomainInfo(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 = { + 'name': 'str', + 'scheme': 'str' + } + + attribute_map = { + 'name': 'name', + 'scheme': 'scheme' + } + + def __init__(self, name=None, scheme=None): # noqa: E501 + """DomainInfo - a model defined in Swagger""" # noqa: E501 + self._name = None + self._scheme = None + self.discriminator = None + if name is not None: + self.name = name + if scheme is not None: + self.scheme = scheme + + @property + def name(self): + """Gets the name of this DomainInfo. # noqa: E501 + + + :return: The name of this DomainInfo. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DomainInfo. + + + :param name: The name of this DomainInfo. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def scheme(self): + """Gets the scheme of this DomainInfo. # noqa: E501 + + + :return: The scheme of this DomainInfo. # noqa: E501 + :rtype: str + """ + return self._scheme + + @scheme.setter + def scheme(self, scheme): + """Sets the scheme of this DomainInfo. + + + :param scheme: The scheme of this DomainInfo. # noqa: E501 + :type: str + """ + allowed_values = ["HTTP", "HTTPS", "MIXED"] # noqa: E501 + if scheme not in allowed_values: + raise ValueError( + "Invalid value for `scheme` ({0}), must be one of {1}" # noqa: E501 + .format(scheme, allowed_values) + ) + + self._scheme = scheme + + 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(DomainInfo, 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, DomainInfo): + 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.py b/tb_rest_client/models/models_pe/edge.py new file mode 100644 index 00000000..acc37fa7 --- /dev/null +++ b/tb_rest_client/models/models_pe/edge.py @@ -0,0 +1,448 @@ +# 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 Edge(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': 'str', + 'cloud_endpoint': 'str', + 'created_time': 'int', + 'customer_id': 'CustomerId', + 'edge_license_key': 'str', + 'id': 'EdgeId', + 'label': 'str', + 'name': 'str', + 'owner_id': 'EntityId', + 'root_rule_chain_id': 'RuleChainId', + 'routing_key': 'str', + 'secret': 'str', + 'tenant_id': 'TenantId', + 'type': 'str' + } + + attribute_map = { + 'additional_info': 'additionalInfo', + 'cloud_endpoint': 'cloudEndpoint', + 'created_time': 'createdTime', + 'customer_id': 'customerId', + 'edge_license_key': 'edgeLicenseKey', + 'id': 'id', + 'label': 'label', + 'name': 'name', + 'owner_id': 'ownerId', + 'root_rule_chain_id': 'rootRuleChainId', + 'routing_key': 'routingKey', + 'secret': 'secret', + 'tenant_id': 'tenantId', + 'type': 'type' + } + + def __init__(self, additional_info=None, cloud_endpoint=None, created_time=None, customer_id=None, edge_license_key=None, id=None, label=None, name=None, owner_id=None, root_rule_chain_id=None, routing_key=None, secret=None, tenant_id=None, type=None): # noqa: E501 + """Edge - a model defined in Swagger""" # noqa: E501 + self._additional_info = None + self._cloud_endpoint = None + self._created_time = None + self._customer_id = None + self._edge_license_key = None + self._id = None + self._label = None + self._name = None + self._owner_id = None + self._root_rule_chain_id = None + self._routing_key = None + self._secret = None + self._tenant_id = None + self._type = None + self.discriminator = None + if additional_info is not None: + self.additional_info = additional_info + if cloud_endpoint is not None: + self.cloud_endpoint = cloud_endpoint + if created_time is not None: + self.created_time = created_time + if customer_id is not None: + self.customer_id = customer_id + if edge_license_key is not None: + self.edge_license_key = edge_license_key + if id is not None: + self.id = id + if label is not None: + self.label = label + if name is not None: + self.name = name + if owner_id is not None: + self.owner_id = owner_id + if root_rule_chain_id is not None: + self.root_rule_chain_id = root_rule_chain_id + if routing_key is not None: + self.routing_key = routing_key + if secret is not None: + self.secret = secret + if tenant_id is not None: + self.tenant_id = tenant_id + if type is not None: + self.type = type + + @property + def additional_info(self): + """Gets the additional_info of this Edge. # noqa: E501 + + + :return: The additional_info of this Edge. # noqa: E501 + :rtype: str + """ + return self._additional_info + + @additional_info.setter + def additional_info(self, additional_info): + """Sets the additional_info of this Edge. + + + :param additional_info: The additional_info of this Edge. # noqa: E501 + :type: str + """ + + self._additional_info = additional_info + + @property + def cloud_endpoint(self): + """Gets the cloud_endpoint of this Edge. # noqa: E501 + + + :return: The cloud_endpoint of this Edge. # noqa: E501 + :rtype: str + """ + return self._cloud_endpoint + + @cloud_endpoint.setter + def cloud_endpoint(self, cloud_endpoint): + """Sets the cloud_endpoint of this Edge. + + + :param cloud_endpoint: The cloud_endpoint of this Edge. # noqa: E501 + :type: str + """ + + self._cloud_endpoint = cloud_endpoint + + @property + def created_time(self): + """Gets the created_time of this Edge. # noqa: E501 + + + :return: The created_time of this Edge. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this Edge. + + + :param created_time: The created_time of this Edge. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def customer_id(self): + """Gets the customer_id of this Edge. # noqa: E501 + + + :return: The customer_id of this Edge. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this Edge. + + + :param customer_id: The customer_id of this Edge. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + + @property + def edge_license_key(self): + """Gets the edge_license_key of this Edge. # noqa: E501 + + + :return: The edge_license_key of this Edge. # 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 Edge. + + + :param edge_license_key: The edge_license_key of this Edge. # noqa: E501 + :type: str + """ + + self._edge_license_key = edge_license_key + + @property + def id(self): + """Gets the id of this Edge. # noqa: E501 + + + :return: The id of this Edge. # noqa: E501 + :rtype: EdgeId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Edge. + + + :param id: The id of this Edge. # noqa: E501 + :type: EdgeId + """ + + self._id = id + + @property + def label(self): + """Gets the label of this Edge. # noqa: E501 + + + :return: The label of this Edge. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this Edge. + + + :param label: The label of this Edge. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def name(self): + """Gets the name of this Edge. # noqa: E501 + + + :return: The name of this Edge. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Edge. + + + :param name: The name of this Edge. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def owner_id(self): + """Gets the owner_id of this Edge. # noqa: E501 + + + :return: The owner_id of this Edge. # noqa: E501 + :rtype: EntityId + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this Edge. + + + :param owner_id: The owner_id of this Edge. # noqa: E501 + :type: EntityId + """ + + self._owner_id = owner_id + + @property + def root_rule_chain_id(self): + """Gets the root_rule_chain_id of this Edge. # noqa: E501 + + + :return: The root_rule_chain_id of this Edge. # 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 Edge. + + + :param root_rule_chain_id: The root_rule_chain_id of this Edge. # noqa: E501 + :type: RuleChainId + """ + + self._root_rule_chain_id = root_rule_chain_id + + @property + def routing_key(self): + """Gets the routing_key of this Edge. # noqa: E501 + + + :return: The routing_key of this Edge. # noqa: E501 + :rtype: str + """ + return self._routing_key + + @routing_key.setter + def routing_key(self, routing_key): + """Sets the routing_key of this Edge. + + + :param routing_key: The routing_key of this Edge. # noqa: E501 + :type: str + """ + + self._routing_key = routing_key + + @property + def secret(self): + """Gets the secret of this Edge. # noqa: E501 + + + :return: The secret of this Edge. # noqa: E501 + :rtype: str + """ + return self._secret + + @secret.setter + def secret(self, secret): + """Sets the secret of this Edge. + + + :param secret: The secret of this Edge. # noqa: E501 + :type: str + """ + + self._secret = secret + + @property + def tenant_id(self): + """Gets the tenant_id of this Edge. # noqa: E501 + + + :return: The tenant_id of this Edge. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this Edge. + + + :param tenant_id: The tenant_id of this Edge. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def type(self): + """Gets the type of this Edge. # noqa: E501 + + + :return: The type of this Edge. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Edge. + + + :param type: The type of this Edge. # noqa: E501 + :type: str + """ + + 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(Edge, 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, Edge): + 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_event.py b/tb_rest_client/models/models_pe/edge_event.py new file mode 100644 index 00000000..1efeb0c2 --- /dev/null +++ b/tb_rest_client/models/models_pe/edge_event.py @@ -0,0 +1,356 @@ +# 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 EdgeEvent(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 = { + 'action': 'str', + 'body': 'str', + 'created_time': 'int', + 'edge_id': 'EdgeId', + 'entity_group_id': 'str', + 'entity_id': 'str', + 'id': 'EdgeEventId', + 'tenant_id': 'TenantId', + 'type': 'str', + 'uid': 'str' + } + + attribute_map = { + 'action': 'action', + 'body': 'body', + 'created_time': 'createdTime', + 'edge_id': 'edgeId', + 'entity_group_id': 'entityGroupId', + 'entity_id': 'entityId', + 'id': 'id', + 'tenant_id': 'tenantId', + 'type': 'type', + 'uid': 'uid' + } + + def __init__(self, action=None, body=None, created_time=None, edge_id=None, entity_group_id=None, entity_id=None, id=None, tenant_id=None, type=None, uid=None): # noqa: E501 + """EdgeEvent - a model defined in Swagger""" # noqa: E501 + self._action = None + self._body = None + self._created_time = None + self._edge_id = None + self._entity_group_id = None + self._entity_id = None + self._id = None + self._tenant_id = None + self._type = None + self._uid = None + self.discriminator = None + if action is not None: + self.action = action + if body is not None: + self.body = body + if created_time is not None: + self.created_time = created_time + if edge_id is not None: + self.edge_id = edge_id + if entity_group_id is not None: + self.entity_group_id = entity_group_id + if entity_id is not None: + self.entity_id = entity_id + 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 + + @property + def action(self): + """Gets the action of this EdgeEvent. # noqa: E501 + + + :return: The action of this EdgeEvent. # noqa: E501 + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this EdgeEvent. + + + :param action: The action of this EdgeEvent. # noqa: E501 + :type: str + """ + allowed_values = ["ADDED", "DELETED", "UPDATED", "POST_ATTRIBUTES", "ATTRIBUTES_UPDATED", "ATTRIBUTES_DELETED", "TIMESERIES_UPDATED", "CREDENTIALS_UPDATED", "RELATION_ADD_OR_UPDATE", "RELATION_DELETED", "RPC_CALL", "ALARM_ACK", "ALARM_CLEAR", "ASSIGNED_TO_EDGE", "UNASSIGNED_FROM_EDGE", "CREDENTIALS_REQUEST", "ENTITY_MERGE_REQUEST", "ADDED_TO_ENTITY_GROUP", "REMOVED_FROM_ENTITY_GROUP", "CHANGE_OWNER"] # noqa: E501 + if action not in allowed_values: + raise ValueError( + "Invalid value for `action` ({0}), must be one of {1}" # noqa: E501 + .format(action, allowed_values) + ) + + self._action = action + + @property + def body(self): + """Gets the body of this EdgeEvent. # noqa: E501 + + + :return: The body of this EdgeEvent. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EdgeEvent. + + + :param body: The body of this EdgeEvent. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def created_time(self): + """Gets the created_time of this EdgeEvent. # noqa: E501 + + + :return: The created_time of this EdgeEvent. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this EdgeEvent. + + + :param created_time: The created_time of this EdgeEvent. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def edge_id(self): + """Gets the edge_id of this EdgeEvent. # noqa: E501 + + + :return: The edge_id of this EdgeEvent. # noqa: E501 + :rtype: EdgeId + """ + return self._edge_id + + @edge_id.setter + def edge_id(self, edge_id): + """Sets the edge_id of this EdgeEvent. + + + :param edge_id: The edge_id of this EdgeEvent. # noqa: E501 + :type: EdgeId + """ + + self._edge_id = edge_id + + @property + def entity_group_id(self): + """Gets the entity_group_id of this EdgeEvent. # noqa: E501 + + + :return: The entity_group_id of this EdgeEvent. # noqa: E501 + :rtype: str + """ + return self._entity_group_id + + @entity_group_id.setter + def entity_group_id(self, entity_group_id): + """Sets the entity_group_id of this EdgeEvent. + + + :param entity_group_id: The entity_group_id of this EdgeEvent. # noqa: E501 + :type: str + """ + + self._entity_group_id = entity_group_id + + @property + def entity_id(self): + """Gets the entity_id of this EdgeEvent. # noqa: E501 + + + :return: The entity_id of this EdgeEvent. # noqa: E501 + :rtype: str + """ + return self._entity_id + + @entity_id.setter + def entity_id(self, entity_id): + """Sets the entity_id of this EdgeEvent. + + + :param entity_id: The entity_id of this EdgeEvent. # noqa: E501 + :type: str + """ + + self._entity_id = entity_id + + @property + def id(self): + """Gets the id of this EdgeEvent. # noqa: E501 + + + :return: The id of this EdgeEvent. # noqa: E501 + :rtype: EdgeEventId + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EdgeEvent. + + + :param id: The id of this EdgeEvent. # noqa: E501 + :type: EdgeEventId + """ + + self._id = id + + @property + def tenant_id(self): + """Gets the tenant_id of this EdgeEvent. # noqa: E501 + + + :return: The tenant_id of this EdgeEvent. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this EdgeEvent. + + + :param tenant_id: The tenant_id of this EdgeEvent. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def type(self): + """Gets the type of this EdgeEvent. # noqa: E501 + + + :return: The type of this EdgeEvent. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this EdgeEvent. + + + :param type: The type of this EdgeEvent. # noqa: E501 + :type: str + """ + allowed_values = ["DASHBOARD", "ASSET", "DEVICE", "DEVICE_PROFILE", "ENTITY_VIEW", "ALARM", "RULE_CHAIN", "RULE_CHAIN_METADATA", "EDGE", "USER", "CUSTOMER", "RELATION", "TENANT", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ENTITY_GROUP", "SCHEDULER_EVENT", "WHITE_LABELING", "LOGIN_WHITE_LABELING", "CUSTOM_TRANSLATION", "ADMIN_SETTINGS", "ROLE", "GROUP_PERMISSION"] # 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 uid(self): + """Gets the uid of this EdgeEvent. # noqa: E501 + + + :return: The uid of this EdgeEvent. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this EdgeEvent. + + + :param uid: The uid of this EdgeEvent. # noqa: E501 + :type: str + """ + + self._uid = uid + + 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(EdgeEvent, 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, EdgeEvent): + 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_data.py b/tb_rest_client/models/models_pe/entity_data.py new file mode 100644 index 00000000..1b29f4d3 --- /dev/null +++ b/tb_rest_client/models/models_pe/entity_data.py @@ -0,0 +1,214 @@ +# 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 EntityData(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 = { + 'entity_id': 'EntityId', + 'latest': 'dict(str, dict(str, TsValue))', + 'read_attrs': 'bool', + 'read_ts': 'bool', + 'timeseries': 'dict(str, list[TsValue])' + } + + attribute_map = { + 'entity_id': 'entityId', + 'latest': 'latest', + 'read_attrs': 'readAttrs', + 'read_ts': 'readTs', + 'timeseries': 'timeseries' + } + + def __init__(self, entity_id=None, latest=None, read_attrs=None, read_ts=None, timeseries=None): # noqa: E501 + """EntityData - a model defined in Swagger""" # noqa: E501 + self._entity_id = None + self._latest = None + self._read_attrs = None + self._read_ts = None + self._timeseries = None + self.discriminator = None + if entity_id is not None: + self.entity_id = entity_id + if latest is not None: + self.latest = latest + if read_attrs is not None: + self.read_attrs = read_attrs + if read_ts is not None: + self.read_ts = read_ts + if timeseries is not None: + self.timeseries = timeseries + + @property + def entity_id(self): + """Gets the entity_id of this EntityData. # noqa: E501 + + + :return: The entity_id of this EntityData. # noqa: E501 + :rtype: EntityId + """ + return self._entity_id + + @entity_id.setter + def entity_id(self, entity_id): + """Sets the entity_id of this EntityData. + + + :param entity_id: The entity_id of this EntityData. # noqa: E501 + :type: EntityId + """ + + self._entity_id = entity_id + + @property + def latest(self): + """Gets the latest of this EntityData. # noqa: E501 + + + :return: The latest of this EntityData. # noqa: E501 + :rtype: dict(str, dict(str, TsValue)) + """ + return self._latest + + @latest.setter + def latest(self, latest): + """Sets the latest of this EntityData. + + + :param latest: The latest of this EntityData. # noqa: E501 + :type: dict(str, dict(str, TsValue)) + """ + + self._latest = latest + + @property + def read_attrs(self): + """Gets the read_attrs of this EntityData. # noqa: E501 + + + :return: The read_attrs of this EntityData. # noqa: E501 + :rtype: bool + """ + return self._read_attrs + + @read_attrs.setter + def read_attrs(self, read_attrs): + """Sets the read_attrs of this EntityData. + + + :param read_attrs: The read_attrs of this EntityData. # noqa: E501 + :type: bool + """ + + self._read_attrs = read_attrs + + @property + def read_ts(self): + """Gets the read_ts of this EntityData. # noqa: E501 + + + :return: The read_ts of this EntityData. # noqa: E501 + :rtype: bool + """ + return self._read_ts + + @read_ts.setter + def read_ts(self, read_ts): + """Sets the read_ts of this EntityData. + + + :param read_ts: The read_ts of this EntityData. # noqa: E501 + :type: bool + """ + + self._read_ts = read_ts + + @property + def timeseries(self): + """Gets the timeseries of this EntityData. # noqa: E501 + + + :return: The timeseries of this EntityData. # noqa: E501 + :rtype: dict(str, list[TsValue]) + """ + return self._timeseries + + @timeseries.setter + def timeseries(self, timeseries): + """Sets the timeseries of this EntityData. + + + :param timeseries: The timeseries of this EntityData. # noqa: E501 + :type: dict(str, list[TsValue]) + """ + + self._timeseries = timeseries + + 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(EntityData, 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, EntityData): + 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_group.py b/tb_rest_client/models/models_pe/entity_group.py index df2c4394..791ef1cf 100644 --- a/tb_rest_client/models/models_pe/entity_group.py +++ b/tb_rest_client/models/models_pe/entity_group.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntityGroup(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 @@ -35,6 +31,7 @@ class EntityGroup(object): 'additional_info': 'str', 'configuration': 'str', 'created_time': 'int', + 'edge_group_all': 'bool', 'group_all': 'bool', 'id': 'EntityGroupId', 'name': 'str', @@ -46,6 +43,7 @@ class EntityGroup(object): 'additional_info': 'additionalInfo', 'configuration': 'configuration', 'created_time': 'createdTime', + 'edge_group_all': 'edgeGroupAll', 'group_all': 'groupAll', 'id': 'id', 'name': 'name', @@ -53,25 +51,26 @@ class EntityGroup(object): 'type': 'type' } - def __init__(self, additional_info=None, configuration=None, created_time=None, group_all=None, id=None, name=None, owner_id=None, type=None): # noqa: E501 + def __init__(self, additional_info=None, configuration=None, created_time=None, edge_group_all=None, group_all=None, id=None, name=None, owner_id=None, type=None): # noqa: E501 """EntityGroup - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._configuration = None self._created_time = None + self._edge_group_all = None self._group_all = None self._id = None self._name = None self._owner_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if configuration is not None: self.configuration = configuration if created_time is not None: self.created_time = created_time + if edge_group_all is not None: + self.edge_group_all = edge_group_all if group_all is not None: self.group_all = group_all if id is not None: @@ -144,6 +143,27 @@ def created_time(self, created_time): self._created_time = created_time + @property + def edge_group_all(self): + """Gets the edge_group_all of this EntityGroup. # noqa: E501 + + + :return: The edge_group_all of this EntityGroup. # noqa: E501 + :rtype: bool + """ + return self._edge_group_all + + @edge_group_all.setter + def edge_group_all(self, edge_group_all): + """Sets the edge_group_all of this EntityGroup. + + + :param edge_group_all: The edge_group_all of this EntityGroup. # noqa: E501 + :type: bool + """ + + self._edge_group_all = edge_group_all + @property def group_all(self): """Gets the group_all of this EntityGroup. # noqa: E501 @@ -250,7 +270,7 @@ def type(self, type): """ if type is None: raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["CUSTOMER", "ASSET", "DEVICE", "USER", "ENTITY_VIEW", "DASHBOARD"] # noqa: E501 + allowed_values = ["CUSTOMER", "ASSET", "DEVICE", "USER", "ENTITY_VIEW", "DASHBOARD", "EDGE"] # 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/entity_group_id.py b/tb_rest_client/models/models_pe/entity_group_id.py new file mode 100644 index 00000000..4bbe28b0 --- /dev/null +++ b/tb_rest_client/models/models_pe/entity_group_id.py @@ -0,0 +1,110 @@ +# 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 EntityGroupId(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 + """EntityGroupId - a model defined in Swagger""" # noqa: E501 + self._id = None + self.discriminator = None + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this EntityGroupId. # noqa: E501 + + + :return: The id of this EntityGroupId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EntityGroupId. + + + :param id: The id of this EntityGroupId. # noqa: E501 + :type: str + """ + + 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(EntityGroupId, 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, EntityGroupId): + 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_group_info.py b/tb_rest_client/models/models_pe/entity_group_info.py index 84d37683..ebb7c9d0 100644 --- a/tb_rest_client/models/models_pe/entity_group_info.py +++ b/tb_rest_client/models/models_pe/entity_group_info.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntityGroupInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -35,6 +31,7 @@ class EntityGroupInfo(object): 'additional_info': 'str', 'configuration': 'str', 'created_time': 'int', + 'edge_group_all': 'bool', 'group_all': 'bool', 'id': 'EntityGroupId', 'name': 'str', @@ -47,6 +44,7 @@ class EntityGroupInfo(object): 'additional_info': 'additionalInfo', 'configuration': 'configuration', 'created_time': 'createdTime', + 'edge_group_all': 'edgeGroupAll', 'group_all': 'groupAll', 'id': 'id', 'name': 'name', @@ -55,12 +53,12 @@ class EntityGroupInfo(object): 'type': 'type' } - def __init__(self, additional_info=None, configuration=None, created_time=None, group_all=None, id=None, name=None, owner_id=None, owner_ids=None, type=None): # noqa: E501 + def __init__(self, additional_info=None, configuration=None, created_time=None, edge_group_all=None, group_all=None, id=None, name=None, owner_id=None, owner_ids=None, type=None): # noqa: E501 """EntityGroupInfo - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._configuration = None self._created_time = None + self._edge_group_all = None self._group_all = None self._id = None self._name = None @@ -68,13 +66,14 @@ def __init__(self, additional_info=None, configuration=None, created_time=None, self._owner_ids = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if configuration is not None: self.configuration = configuration if created_time is not None: self.created_time = created_time + if edge_group_all is not None: + self.edge_group_all = edge_group_all if group_all is not None: self.group_all = group_all if id is not None: @@ -149,6 +148,27 @@ def created_time(self, created_time): self._created_time = created_time + @property + def edge_group_all(self): + """Gets the edge_group_all of this EntityGroupInfo. # noqa: E501 + + + :return: The edge_group_all of this EntityGroupInfo. # noqa: E501 + :rtype: bool + """ + return self._edge_group_all + + @edge_group_all.setter + def edge_group_all(self, edge_group_all): + """Sets the edge_group_all of this EntityGroupInfo. + + + :param edge_group_all: The edge_group_all of this EntityGroupInfo. # noqa: E501 + :type: bool + """ + + self._edge_group_all = edge_group_all + @property def group_all(self): """Gets the group_all of this EntityGroupInfo. # noqa: E501 @@ -276,7 +296,7 @@ def type(self, type): """ if type is None: raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["CUSTOMER", "ASSET", "DEVICE", "USER", "ENTITY_VIEW", "DASHBOARD"] # noqa: E501 + allowed_values = ["CUSTOMER", "ASSET", "DEVICE", "USER", "ENTITY_VIEW", "DASHBOARD", "EDGE"] # 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/entity_id.py b/tb_rest_client/models/models_pe/entity_id.py new file mode 100644 index 00000000..10dd9510 --- /dev/null +++ b/tb_rest_client/models/models_pe/entity_id.py @@ -0,0 +1,142 @@ +# 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 EntityId(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 = { + 'entity_type': 'str', + 'id': 'str' + } + + attribute_map = { + 'entity_type': 'entityType', + 'id': 'id' + } + + def __init__(self, entity_type=None, id=None): # noqa: E501 + """EntityId - a model defined in Swagger""" # noqa: E501 + self._entity_type = None + self._id = None + self.discriminator = None + if entity_type is not None: + self.entity_type = entity_type + if id is not None: + self.id = id + + @property + def entity_type(self): + """Gets the entity_type of this EntityId. # noqa: E501 + + + :return: The entity_type of this EntityId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this EntityId. + + + :param entity_type: The entity_type of this EntityId. # noqa: E501 + :type: str + """ + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # 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 id(self): + """Gets the id of this EntityId. # noqa: E501 + + + :return: The id of this EntityId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EntityId. + + + :param id: The id of this EntityId. # noqa: E501 + :type: str + """ + + 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(EntityId, 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, EntityId): + 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.py b/tb_rest_client/models/models_pe/entity_relation.py index 4d91c952..c6253a64 100644 --- a/tb_rest_client/models/models_pe/entity_relation.py +++ b/tb_rest_client/models/models_pe/entity_relation.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntityRelation(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -49,14 +45,12 @@ class EntityRelation(object): def __init__(self, additional_info=None, _from=None, to=None, type=None, type_group=None): # noqa: E501 """EntityRelation - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self.__from = None self._to = None self._type = None self._type_group = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if _from is not None: @@ -170,7 +164,7 @@ def type_group(self, type_group): :param type_group: The type_group of this EntityRelation. # noqa: E501 :type: str """ - allowed_values = ["COMMON", "ALARM", "DASHBOARD", "TO_ENTITY_GROUP", "FROM_ENTITY_GROUP", "RULE_CHAIN", "RULE_NODE"] # noqa: E501 + allowed_values = ["COMMON", "ALARM", "DASHBOARD", "TO_ENTITY_GROUP", "FROM_ENTITY_GROUP", "RULE_CHAIN", "RULE_NODE", "EDGE", "EDGE_AUTO_ASSIGN_RULE_CHAIN"] # noqa: E501 if type_group not in allowed_values: raise ValueError( "Invalid value for `type_group` ({0}), must be one of {1}" # noqa: E501 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 38f2de10..66b64f4d 100644 --- a/tb_rest_client/models/models_pe/entity_relation_info.py +++ b/tb_rest_client/models/models_pe/entity_relation_info.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntityRelationInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -53,7 +49,6 @@ class EntityRelationInfo(object): def __init__(self, additional_info=None, _from=None, from_name=None, to=None, to_name=None, type=None, type_group=None): # noqa: E501 """EntityRelationInfo - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self.__from = None self._from_name = None @@ -62,7 +57,6 @@ def __init__(self, additional_info=None, _from=None, from_name=None, to=None, to self._type = None self._type_group = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if _from is not None: @@ -222,7 +216,7 @@ def type_group(self, type_group): :param type_group: The type_group of this EntityRelationInfo. # noqa: E501 :type: str """ - allowed_values = ["COMMON", "ALARM", "DASHBOARD", "TO_ENTITY_GROUP", "FROM_ENTITY_GROUP", "RULE_CHAIN", "RULE_NODE"] # noqa: E501 + allowed_values = ["COMMON", "ALARM", "DASHBOARD", "TO_ENTITY_GROUP", "FROM_ENTITY_GROUP", "RULE_CHAIN", "RULE_NODE", "EDGE", "EDGE_AUTO_ASSIGN_RULE_CHAIN"] # noqa: E501 if type_group not in allowed_values: raise ValueError( "Invalid value for `type_group` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/entity_subtype.py b/tb_rest_client/models/models_pe/entity_subtype.py index 881eefd8..d832ffe6 100644 --- a/tb_rest_client/models/models_pe/entity_subtype.py +++ b/tb_rest_client/models/models_pe/entity_subtype.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntitySubtype(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 @@ -45,12 +41,10 @@ class EntitySubtype(object): def __init__(self, entity_type=None, tenant_id=None, type=None): # noqa: E501 """EntitySubtype - a model defined in Swagger""" # noqa: E501 - self._entity_type = None self._tenant_id = None self._type = None self.discriminator = None - if entity_type is not None: self.entity_type = entity_type if tenant_id is not None: @@ -76,7 +70,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this EntitySubtype. # noqa: E501 :type: str """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # noqa: E501 + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # 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_view.py b/tb_rest_client/models/models_pe/entity_view.py index 2cfadeaa..d42ed0ab 100644 --- a/tb_rest_client/models/models_pe/entity_view.py +++ b/tb_rest_client/models/models_pe/entity_view.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 EntityView(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -63,7 +59,6 @@ class EntityView(object): def __init__(self, additional_info=None, created_time=None, customer_id=None, end_time_ms=None, entity_id=None, id=None, keys=None, name=None, owner_id=None, start_time_ms=None, tenant_id=None, type=None): # noqa: E501 """EntityView - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._created_time = None self._customer_id = None @@ -77,7 +72,6 @@ def __init__(self, additional_info=None, created_time=None, customer_id=None, en self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if created_time is not None: diff --git a/tb_rest_client/models/models_pe/entity_view_id.py b/tb_rest_client/models/models_pe/entity_view_id.py new file mode 100644 index 00000000..159ec620 --- /dev/null +++ b/tb_rest_client/models/models_pe/entity_view_id.py @@ -0,0 +1,143 @@ +# 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 EntityViewId(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 = { + 'entity_type': 'str', + 'id': 'str' + } + + attribute_map = { + 'entity_type': 'entityType', + 'id': 'id' + } + + def __init__(self, entity_type=None, id=None): # noqa: E501 + """EntityViewId - a model defined in Swagger""" # noqa: E501 + self._entity_type = None + self._id = None + self.discriminator = None + if entity_type is not None: + self.entity_type = entity_type + self.id = id + + @property + def entity_type(self): + """Gets the entity_type of this EntityViewId. # noqa: E501 + + + :return: The entity_type of this EntityViewId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this EntityViewId. + + + :param entity_type: The entity_type of this EntityViewId. # noqa: E501 + :type: str + """ + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # 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 id(self): + """Gets the id of this EntityViewId. # noqa: E501 + + + :return: The id of this EntityViewId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EntityViewId. + + + :param id: The id of this EntityViewId. # 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(EntityViewId, 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, EntityViewId): + 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/favicon.py b/tb_rest_client/models/models_pe/favicon.py index e0d612d0..dd7b88e0 100644 --- a/tb_rest_client/models/models_pe/favicon.py +++ b/tb_rest_client/models/models_pe/favicon.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Favicon(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -43,11 +39,9 @@ class Favicon(object): def __init__(self, type=None, url=None): # noqa: E501 """Favicon - a model defined in Swagger""" # noqa: E501 - self._type = None self._url = None self.discriminator = None - if type is not None: self.type = type if url is not None: diff --git a/tb_rest_client/models/models_pe/group_permission.py b/tb_rest_client/models/models_pe/group_permission.py index 3e4722cc..be3a2288 100644 --- a/tb_rest_client/models/models_pe/group_permission.py +++ b/tb_rest_client/models/models_pe/group_permission.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 GroupPermission(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 @@ -41,6 +37,7 @@ class GroupPermission(object): 'role_id': 'RoleId', 'tenant_id': 'TenantId', 'user_group_id': 'EntityGroupId', + 'is_public': 'bool' } attribute_map = { @@ -52,12 +49,12 @@ class GroupPermission(object): 'public': 'public', 'role_id': 'roleId', 'tenant_id': 'tenantId', - 'user_group_id': 'userGroupId' + 'user_group_id': 'userGroupId', + 'is_public': 'isPublic' } - def __init__(self, created_time=None, entity_group_id=None, entity_group_type=None, id=None, name=None, public=None, role_id=None, tenant_id=None, user_group_id=None): # noqa: E501 + def __init__(self, created_time=None, entity_group_id=None, entity_group_type=None, id=None, name=None, public=None, role_id=None, tenant_id=None, user_group_id=None, is_public=None): # noqa: E501 """GroupPermission - a model defined in Swagger""" # noqa: E501 - self._created_time = None self._entity_group_id = None self._entity_group_type = None @@ -67,8 +64,8 @@ def __init__(self, created_time=None, entity_group_id=None, entity_group_type=No self._role_id = None self._tenant_id = None self._user_group_id = None + self._is_public = None self.discriminator = None - if created_time is not None: self.created_time = created_time if entity_group_id is not None: @@ -87,6 +84,7 @@ def __init__(self, created_time=None, entity_group_id=None, entity_group_type=No self.tenant_id = tenant_id if user_group_id is not None: self.user_group_id = user_group_id + self.is_public = is_public @property def created_time(self): @@ -148,7 +146,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 = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # noqa: E501 + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # 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 @@ -283,6 +281,29 @@ def user_group_id(self, user_group_id): self._user_group_id = user_group_id + @property + def is_public(self): + """Gets the is_public of this GroupPermission. # noqa: E501 + + + :return: The is_public of this GroupPermission. # noqa: E501 + :rtype: bool + """ + return self._is_public + + @is_public.setter + def is_public(self, is_public): + """Sets the is_public of this GroupPermission. + + + :param is_public: The is_public of this GroupPermission. # noqa: E501 + :type: bool + """ + if is_public is None: + raise ValueError("Invalid value for `is_public`, must not be `None`") # noqa: E501 + + self._is_public = is_public + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_pe/group_permission_id.py b/tb_rest_client/models/models_pe/group_permission_id.py new file mode 100644 index 00000000..fed5a052 --- /dev/null +++ b/tb_rest_client/models/models_pe/group_permission_id.py @@ -0,0 +1,142 @@ +# 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 GroupPermissionId(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 = { + 'entity_type': 'str', + 'id': 'str' + } + + attribute_map = { + 'entity_type': 'entityType', + 'id': 'id' + } + + def __init__(self, entity_type=None, id=None): # noqa: E501 + """GroupPermissionId - a model defined in Swagger""" # noqa: E501 + self._entity_type = None + self._id = None + self.discriminator = None + if entity_type is not None: + self.entity_type = entity_type + if id is not None: + self.id = id + + @property + def entity_type(self): + """Gets the entity_type of this GroupPermissionId. # noqa: E501 + + + :return: The entity_type of this GroupPermissionId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this GroupPermissionId. + + + :param entity_type: The entity_type of this GroupPermissionId. # noqa: E501 + :type: str + """ + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # 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 id(self): + """Gets the id of this GroupPermissionId. # noqa: E501 + + + :return: The id of this GroupPermissionId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this GroupPermissionId. + + + :param id: The id of this GroupPermissionId. # noqa: E501 + :type: str + """ + + 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(GroupPermissionId, 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, GroupPermissionId): + 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/group_permission_info.py b/tb_rest_client/models/models_pe/group_permission_info.py index f536d5a3..76ac6355 100644 --- a/tb_rest_client/models/models_pe/group_permission_info.py +++ b/tb_rest_client/models/models_pe/group_permission_info.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 GroupPermissionInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -73,7 +69,6 @@ class GroupPermissionInfo(object): def __init__(self, created_time=None, entity_group_id=None, entity_group_name=None, entity_group_owner_id=None, entity_group_owner_name=None, entity_group_type=None, id=None, name=None, public=None, read_only=None, role=None, role_id=None, tenant_id=None, user_group_id=None, user_group_name=None, user_group_owner_id=None, user_group_owner_name=None): # noqa: E501 """GroupPermissionInfo - a model defined in Swagger""" # noqa: E501 - self._created_time = None self._entity_group_id = None self._entity_group_name = None @@ -92,7 +87,6 @@ def __init__(self, created_time=None, entity_group_id=None, entity_group_name=No self._user_group_owner_id = None self._user_group_owner_name = None self.discriminator = None - if created_time is not None: self.created_time = created_time if entity_group_id is not None: @@ -251,7 +245,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 = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # noqa: E501 + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # 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 new file mode 100644 index 00000000..9e3d9ae6 --- /dev/null +++ b/tb_rest_client/models/models_pe/home_dashboard.py @@ -0,0 +1,396 @@ +# 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 HomeDashboard(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 = { + 'assigned_customers': 'list[ShortCustomerInfo]', + 'configuration': 'str', + 'created_time': 'int', + 'customer_id': 'CustomerId', + 'hide_dashboard_toolbar': 'bool', + 'image': 'str', + 'mobile_hide': 'bool', + 'mobile_order': 'int', + 'name': 'str', + 'owner_id': 'EntityId', + 'tenant_id': 'TenantId', + 'title': 'str' + } + + attribute_map = { + 'assigned_customers': 'assignedCustomers', + 'configuration': 'configuration', + 'created_time': 'createdTime', + 'customer_id': 'customerId', + 'hide_dashboard_toolbar': 'hideDashboardToolbar', + 'image': 'image', + 'mobile_hide': 'mobileHide', + 'mobile_order': 'mobileOrder', + 'name': 'name', + 'owner_id': 'ownerId', + 'tenant_id': 'tenantId', + 'title': 'title' + } + + def __init__(self, assigned_customers=None, configuration=None, created_time=None, customer_id=None, hide_dashboard_toolbar=None, image=None, mobile_hide=None, mobile_order=None, name=None, owner_id=None, tenant_id=None, title=None): # noqa: E501 + """HomeDashboard - a model defined in Swagger""" # noqa: E501 + self._assigned_customers = None + self._configuration = None + self._created_time = None + self._customer_id = None + self._hide_dashboard_toolbar = None + self._image = None + self._mobile_hide = None + self._mobile_order = None + self._name = None + self._owner_id = None + self._tenant_id = None + self._title = None + self.discriminator = None + if assigned_customers is not None: + self.assigned_customers = assigned_customers + if configuration is not None: + self.configuration = configuration + if created_time is not None: + self.created_time = created_time + if customer_id is not None: + self.customer_id = customer_id + if hide_dashboard_toolbar is not None: + self.hide_dashboard_toolbar = hide_dashboard_toolbar + if image is not None: + self.image = image + if mobile_hide is not None: + self.mobile_hide = mobile_hide + if mobile_order is not None: + self.mobile_order = mobile_order + if name is not None: + self.name = name + if owner_id is not None: + self.owner_id = owner_id + if tenant_id is not None: + self.tenant_id = tenant_id + if title is not None: + self.title = title + + @property + def assigned_customers(self): + """Gets the assigned_customers of this HomeDashboard. # noqa: E501 + + + :return: The assigned_customers of this HomeDashboard. # noqa: E501 + :rtype: list[ShortCustomerInfo] + """ + return self._assigned_customers + + @assigned_customers.setter + def assigned_customers(self, assigned_customers): + """Sets the assigned_customers of this HomeDashboard. + + + :param assigned_customers: The assigned_customers of this HomeDashboard. # noqa: E501 + :type: list[ShortCustomerInfo] + """ + + self._assigned_customers = assigned_customers + + @property + def configuration(self): + """Gets the configuration of this HomeDashboard. # noqa: E501 + + + :return: The configuration of this HomeDashboard. # noqa: E501 + :rtype: str + """ + return self._configuration + + @configuration.setter + def configuration(self, configuration): + """Sets the configuration of this HomeDashboard. + + + :param configuration: The configuration of this HomeDashboard. # noqa: E501 + :type: str + """ + + self._configuration = configuration + + @property + def created_time(self): + """Gets the created_time of this HomeDashboard. # noqa: E501 + + + :return: The created_time of this HomeDashboard. # noqa: E501 + :rtype: int + """ + return self._created_time + + @created_time.setter + def created_time(self, created_time): + """Sets the created_time of this HomeDashboard. + + + :param created_time: The created_time of this HomeDashboard. # noqa: E501 + :type: int + """ + + self._created_time = created_time + + @property + def customer_id(self): + """Gets the customer_id of this HomeDashboard. # noqa: E501 + + + :return: The customer_id of this HomeDashboard. # noqa: E501 + :rtype: CustomerId + """ + return self._customer_id + + @customer_id.setter + def customer_id(self, customer_id): + """Sets the customer_id of this HomeDashboard. + + + :param customer_id: The customer_id of this HomeDashboard. # noqa: E501 + :type: CustomerId + """ + + self._customer_id = customer_id + + @property + def hide_dashboard_toolbar(self): + """Gets the hide_dashboard_toolbar of this HomeDashboard. # noqa: E501 + + + :return: The hide_dashboard_toolbar of this HomeDashboard. # 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 HomeDashboard. + + + :param hide_dashboard_toolbar: The hide_dashboard_toolbar of this HomeDashboard. # noqa: E501 + :type: bool + """ + + self._hide_dashboard_toolbar = hide_dashboard_toolbar + + @property + def image(self): + """Gets the image of this HomeDashboard. # noqa: E501 + + + :return: The image of this HomeDashboard. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this HomeDashboard. + + + :param image: The image of this HomeDashboard. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def mobile_hide(self): + """Gets the mobile_hide of this HomeDashboard. # noqa: E501 + + + :return: The mobile_hide of this HomeDashboard. # noqa: E501 + :rtype: bool + """ + return self._mobile_hide + + @mobile_hide.setter + def mobile_hide(self, mobile_hide): + """Sets the mobile_hide of this HomeDashboard. + + + :param mobile_hide: The mobile_hide of this HomeDashboard. # noqa: E501 + :type: bool + """ + + self._mobile_hide = mobile_hide + + @property + def mobile_order(self): + """Gets the mobile_order of this HomeDashboard. # noqa: E501 + + + :return: The mobile_order of this HomeDashboard. # noqa: E501 + :rtype: int + """ + return self._mobile_order + + @mobile_order.setter + def mobile_order(self, mobile_order): + """Sets the mobile_order of this HomeDashboard. + + + :param mobile_order: The mobile_order of this HomeDashboard. # noqa: E501 + :type: int + """ + + self._mobile_order = mobile_order + + @property + def name(self): + """Gets the name of this HomeDashboard. # noqa: E501 + + + :return: The name of this HomeDashboard. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this HomeDashboard. + + + :param name: The name of this HomeDashboard. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def owner_id(self): + """Gets the owner_id of this HomeDashboard. # noqa: E501 + + + :return: The owner_id of this HomeDashboard. # noqa: E501 + :rtype: EntityId + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this HomeDashboard. + + + :param owner_id: The owner_id of this HomeDashboard. # noqa: E501 + :type: EntityId + """ + + self._owner_id = owner_id + + @property + def tenant_id(self): + """Gets the tenant_id of this HomeDashboard. # noqa: E501 + + + :return: The tenant_id of this HomeDashboard. # noqa: E501 + :rtype: TenantId + """ + return self._tenant_id + + @tenant_id.setter + def tenant_id(self, tenant_id): + """Sets the tenant_id of this HomeDashboard. + + + :param tenant_id: The tenant_id of this HomeDashboard. # noqa: E501 + :type: TenantId + """ + + self._tenant_id = tenant_id + + @property + def title(self): + """Gets the title of this HomeDashboard. # noqa: E501 + + + :return: The title of this HomeDashboard. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this HomeDashboard. + + + :param title: The title of this HomeDashboard. # noqa: E501 + :type: str + """ + + self._title = title + + 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(HomeDashboard, 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, HomeDashboard): + 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/http_routing_key_body.py b/tb_rest_client/models/models_pe/http_routing_key_body.py new file mode 100644 index 00000000..a210c003 --- /dev/null +++ b/tb_rest_client/models/models_pe/http_routing_key_body.py @@ -0,0 +1,113 @@ +# 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 HttpRoutingKeyBody(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 = { + 'request_params': 'Object' + } + + attribute_map = { + 'request_params': 'requestParams' + } + + def __init__(self, request_params=None): # noqa: E501 + """HttpRoutingKeyBody - a model defined in Swagger""" # noqa: E501 + self._request_params = None + self.discriminator = None + self.request_params = request_params + + @property + def request_params(self): + """Gets the request_params of this HttpRoutingKeyBody. # noqa: E501 + + requestParams # noqa: E501 + + :return: The request_params of this HttpRoutingKeyBody. # noqa: E501 + :rtype: Object + """ + return self._request_params + + @request_params.setter + def request_params(self, request_params): + """Sets the request_params of this HttpRoutingKeyBody. + + requestParams # noqa: E501 + + :param request_params: The request_params of this HttpRoutingKeyBody. # noqa: E501 + :type: Object + """ + if request_params is None: + raise ValueError("Invalid value for `request_params`, must not be `None`") # noqa: E501 + + self._request_params = request_params + + 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(HttpRoutingKeyBody, 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, HttpRoutingKeyBody): + 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.py b/tb_rest_client/models/models_pe/integration.py index a2215bd5..12212c04 100644 --- a/tb_rest_client/models/models_pe/integration.py +++ b/tb_rest_client/models/models_pe/integration.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Integration(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -33,6 +29,7 @@ class Integration(object): """ swagger_types = { 'additional_info': 'str', + 'allow_create_devices_or_assets': 'bool', 'configuration': 'str', 'created_time': 'int', 'debug_mode': 'bool', @@ -50,6 +47,7 @@ class Integration(object): attribute_map = { 'additional_info': 'additionalInfo', + 'allow_create_devices_or_assets': 'allowCreateDevicesOrAssets', 'configuration': 'configuration', 'created_time': 'createdTime', 'debug_mode': 'debugMode', @@ -65,10 +63,10 @@ class Integration(object): 'type': 'type' } - def __init__(self, additional_info=None, configuration=None, created_time=None, debug_mode=None, default_converter_id=None, downlink_converter_id=None, enabled=None, id=None, name=None, remote=None, routing_key=None, secret=None, tenant_id=None, type=None): # noqa: E501 + def __init__(self, additional_info=None, allow_create_devices_or_assets=None, configuration=None, created_time=None, debug_mode=None, default_converter_id=None, downlink_converter_id=None, enabled=None, id=None, name=None, remote=None, routing_key=None, secret=None, tenant_id=None, type=None): # noqa: E501 """Integration - a model defined in Swagger""" # noqa: E501 - self._additional_info = None + self._allow_create_devices_or_assets = None self._configuration = None self._created_time = None self._debug_mode = None @@ -83,9 +81,10 @@ def __init__(self, additional_info=None, configuration=None, created_time=None, self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info + if allow_create_devices_or_assets is not None: + self.allow_create_devices_or_assets = allow_create_devices_or_assets if configuration is not None: self.configuration = configuration if created_time is not None: @@ -134,6 +133,27 @@ def additional_info(self, additional_info): self._additional_info = additional_info + @property + def allow_create_devices_or_assets(self): + """Gets the allow_create_devices_or_assets of this Integration. # noqa: E501 + + + :return: The allow_create_devices_or_assets of this Integration. # 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 Integration. + + + :param allow_create_devices_or_assets: The allow_create_devices_or_assets of this Integration. # noqa: E501 + :type: bool + """ + + self._allow_create_devices_or_assets = allow_create_devices_or_assets + @property def configuration(self): """Gets the configuration of this Integration. # noqa: E501 @@ -404,7 +424,7 @@ def type(self, type): :param type: The type of this Integration. # noqa: E501 :type: str """ - allowed_values = ["OCEANCONNECT", "SIGFOX", "THINGPARK", "TPE", "TMOBILE_IOT_CDP", "HTTP", "MQTT", "AWS_IOT", "AWS_SQS", "AWS_KINESIS", "IBM_WATSON_IOT", "TTN", "AZURE_EVENT_HUB", "OPC_UA", "CUSTOM", "UDP", "TCP", "KAFKA"] # noqa: E501 + allowed_values = ["OCEANCONNECT", "SIGFOX", "THINGPARK", "TPE", "CHIRPSTACK", "TMOBILE_IOT_CDP", "HTTP", "MQTT", "PUB_SUB", "AWS_IOT", "AWS_SQS", "AWS_KINESIS", "IBM_WATSON_IOT", "TTN", "TTI", "AZURE_EVENT_HUB", "OPC_UA", "CUSTOM", "UDP", "TCP", "KAFKA", "AZURE_IOT_HUB", "APACHE_PULSAR", "RABBITMQ", "LORIOT", "COAP"] # 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 new file mode 100644 index 00000000..3436d1b8 --- /dev/null +++ b/tb_rest_client/models/models_pe/integration_id.py @@ -0,0 +1,111 @@ +# 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 IntegrationId(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 + """IntegrationId - 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 IntegrationId. # noqa: E501 + + + :return: The id of this IntegrationId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this IntegrationId. + + + :param id: The id of this IntegrationId. # 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(IntegrationId, 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, IntegrationId): + 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/login_white_labeling_params.py b/tb_rest_client/models/models_pe/login_white_labeling_params.py index 51444429..cf67da17 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 LoginWhiteLabelingParams(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -34,6 +30,7 @@ class LoginWhiteLabelingParams(object): swagger_types = { 'admin_settings_id': 'str', 'app_title': 'str', + 'base_url': 'str', 'custom_css': 'str', 'dark_foreground': 'bool', 'domain_name': 'str', @@ -48,6 +45,7 @@ class LoginWhiteLabelingParams(object): 'palette_settings': 'PaletteSettings', 'platform_name': 'str', 'platform_version': 'str', + 'prohibit_different_url': 'bool', 'show_name_bottom': 'bool', 'show_name_version': 'bool', 'white_labeling_enabled': 'bool' @@ -56,6 +54,7 @@ class LoginWhiteLabelingParams(object): attribute_map = { 'admin_settings_id': 'adminSettingsId', 'app_title': 'appTitle', + 'base_url': 'baseUrl', 'custom_css': 'customCss', 'dark_foreground': 'darkForeground', 'domain_name': 'domainName', @@ -70,16 +69,17 @@ class LoginWhiteLabelingParams(object): 'palette_settings': 'paletteSettings', 'platform_name': 'platformName', 'platform_version': 'platformVersion', + 'prohibit_different_url': 'prohibitDifferentUrl', 'show_name_bottom': 'showNameBottom', 'show_name_version': 'showNameVersion', 'white_labeling_enabled': 'whiteLabelingEnabled' } - def __init__(self, admin_settings_id=None, app_title=None, custom_css=None, dark_foreground=None, domain_name=None, enable_help_links=None, favicon=None, favicon_checksum=None, help_link_base_url=None, logo_image_checksum=None, logo_image_height=None, logo_image_url=None, page_background_color=None, palette_settings=None, platform_name=None, platform_version=None, show_name_bottom=None, show_name_version=None, white_labeling_enabled=None): # noqa: E501 + def __init__(self, admin_settings_id=None, app_title=None, base_url=None, custom_css=None, dark_foreground=None, domain_name=None, enable_help_links=None, favicon=None, favicon_checksum=None, help_link_base_url=None, logo_image_checksum=None, logo_image_height=None, logo_image_url=None, page_background_color=None, palette_settings=None, platform_name=None, platform_version=None, prohibit_different_url=None, show_name_bottom=None, show_name_version=None, white_labeling_enabled=None): # noqa: E501 """LoginWhiteLabelingParams - a model defined in Swagger""" # noqa: E501 - self._admin_settings_id = None self._app_title = None + self._base_url = None self._custom_css = None self._dark_foreground = None self._domain_name = None @@ -94,15 +94,17 @@ def __init__(self, admin_settings_id=None, app_title=None, custom_css=None, dark self._palette_settings = None self._platform_name = None self._platform_version = None + self._prohibit_different_url = None self._show_name_bottom = None self._show_name_version = None self._white_labeling_enabled = None self.discriminator = None - if admin_settings_id is not None: self.admin_settings_id = admin_settings_id if app_title is not None: self.app_title = app_title + if base_url is not None: + self.base_url = base_url if custom_css is not None: self.custom_css = custom_css if dark_foreground is not None: @@ -131,6 +133,8 @@ def __init__(self, admin_settings_id=None, app_title=None, custom_css=None, dark self.platform_name = platform_name if platform_version is not None: self.platform_version = platform_version + if prohibit_different_url is not None: + self.prohibit_different_url = prohibit_different_url if show_name_bottom is not None: self.show_name_bottom = show_name_bottom if show_name_version is not None: @@ -180,6 +184,27 @@ def app_title(self, app_title): self._app_title = app_title + @property + def base_url(self): + """Gets the base_url of this LoginWhiteLabelingParams. # noqa: E501 + + + :return: The base_url of this LoginWhiteLabelingParams. # noqa: E501 + :rtype: str + """ + return self._base_url + + @base_url.setter + def base_url(self, base_url): + """Sets the base_url of this LoginWhiteLabelingParams. + + + :param base_url: The base_url of this LoginWhiteLabelingParams. # noqa: E501 + :type: str + """ + + self._base_url = base_url + @property def custom_css(self): """Gets the custom_css of this LoginWhiteLabelingParams. # noqa: E501 @@ -474,6 +499,27 @@ def platform_version(self, platform_version): self._platform_version = platform_version + @property + def prohibit_different_url(self): + """Gets the prohibit_different_url of this LoginWhiteLabelingParams. # noqa: E501 + + + :return: The prohibit_different_url of this LoginWhiteLabelingParams. # noqa: E501 + :rtype: bool + """ + return self._prohibit_different_url + + @prohibit_different_url.setter + def prohibit_different_url(self, prohibit_different_url): + """Sets the prohibit_different_url of this LoginWhiteLabelingParams. + + + :param prohibit_different_url: The prohibit_different_url of this LoginWhiteLabelingParams. # noqa: E501 + :type: bool + """ + + self._prohibit_different_url = prohibit_different_url + @property def show_name_bottom(self): """Gets the show_name_bottom of this LoginWhiteLabelingParams. # noqa: E501 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 f81a84ab..a4382826 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 MergedGroupPermissionInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -43,11 +39,9 @@ class MergedGroupPermissionInfo(object): def __init__(self, entity_type=None, operations=None): # noqa: E501 """MergedGroupPermissionInfo - a model defined in Swagger""" # noqa: E501 - self._entity_type = None self._operations = None self.discriminator = None - if entity_type is not None: self.entity_type = entity_type if operations is not None: @@ -71,7 +65,7 @@ def entity_type(self, entity_type): :param entity_type: The entity_type of this MergedGroupPermissionInfo. # noqa: E501 :type: str """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # noqa: E501 + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # noqa: E501 if entity_type not in allowed_values: raise ValueError( "Invalid value for `entity_type` ({0}), must be one of {1}" # noqa: E501 @@ -98,7 +92,7 @@ def operations(self, operations): :param operations: The operations of this MergedGroupPermissionInfo. # noqa: E501 :type: list[str] """ - allowed_values = ["ALL", "CREATE", "READ", "WRITE", "DELETE", "RPC_CALL", "READ_CREDENTIALS", "WRITE_CREDENTIALS", "READ_ATTRIBUTES", "WRITE_ATTRIBUTES", "READ_TELEMETRY", "WRITE_TELEMETRY", "ADD_TO_GROUP", "REMOVE_FROM_GROUP", "CHANGE_OWNER", "IMPERSONATE", "CLAIM_DEVICES", "SHARE_GROUP"] # noqa: E501 + allowed_values = ["ALL", "CREATE", "READ", "WRITE", "DELETE", "RPC_CALL", "READ_CREDENTIALS", "WRITE_CREDENTIALS", "READ_ATTRIBUTES", "WRITE_ATTRIBUTES", "READ_TELEMETRY", "WRITE_TELEMETRY", "ADD_TO_GROUP", "REMOVE_FROM_GROUP", "CHANGE_OWNER", "IMPERSONATE", "CLAIM_DEVICES", "SHARE_GROUP", "ASSIGN_TO_TENANT"] # noqa: E501 if not set(operations).issubset(set(allowed_values)): raise ValueError( "Invalid values for `operations` [{0}], must be a subset 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 c364e7bf..8fa50739 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 MergedGroupTypePermissionInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -43,11 +39,9 @@ class MergedGroupTypePermissionInfo(object): def __init__(self, entity_group_ids=None, has_generic_read=None): # noqa: E501 """MergedGroupTypePermissionInfo - a model defined in Swagger""" # noqa: E501 - self._entity_group_ids = None self._has_generic_read = None self.discriminator = None - if entity_group_ids is not None: self.entity_group_ids = entity_group_ids if has_generic_read is not None: 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 ff58d131..d68b8865 100644 --- a/tb_rest_client/models/models_pe/merged_user_permissions.py +++ b/tb_rest_client/models/models_pe/merged_user_permissions.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 MergedUserPermissions(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 @@ -34,29 +30,42 @@ class MergedUserPermissions(object): swagger_types = { 'generic_permissions': 'dict(str, list[str])', 'group_permissions': 'dict(str, MergedGroupPermissionInfo)', - 'read_group_permissions': 'dict(str, MergedGroupTypePermissionInfo)' + 'read_attr_permissions': 'dict(str, MergedGroupTypePermissionInfo)', + 'read_entity_permissions': 'dict(str, MergedGroupTypePermissionInfo)', + 'read_group_permissions': 'dict(str, MergedGroupTypePermissionInfo)', + 'read_ts_permissions': 'dict(str, MergedGroupTypePermissionInfo)' } attribute_map = { 'generic_permissions': 'genericPermissions', 'group_permissions': 'groupPermissions', - 'read_group_permissions': 'readGroupPermissions' + 'read_attr_permissions': 'readAttrPermissions', + 'read_entity_permissions': 'readEntityPermissions', + 'read_group_permissions': 'readGroupPermissions', + 'read_ts_permissions': 'readTsPermissions' } - def __init__(self, generic_permissions=None, group_permissions=None, read_group_permissions=None): # noqa: E501 + def __init__(self, generic_permissions=None, group_permissions=None, read_attr_permissions=None, read_entity_permissions=None, read_group_permissions=None, read_ts_permissions=None): # noqa: E501 """MergedUserPermissions - a model defined in Swagger""" # noqa: E501 - self._generic_permissions = None self._group_permissions = None + self._read_attr_permissions = None + self._read_entity_permissions = None self._read_group_permissions = None + self._read_ts_permissions = None self.discriminator = None - if generic_permissions is not None: self.generic_permissions = generic_permissions if group_permissions is not None: self.group_permissions = group_permissions + if read_attr_permissions is not None: + self.read_attr_permissions = read_attr_permissions + if read_entity_permissions is not None: + self.read_entity_permissions = read_entity_permissions if read_group_permissions is not None: self.read_group_permissions = read_group_permissions + if read_ts_permissions is not None: + self.read_ts_permissions = read_ts_permissions @property def generic_permissions(self): @@ -76,7 +85,7 @@ def generic_permissions(self, generic_permissions): :param generic_permissions: The generic_permissions of this MergedUserPermissions. # noqa: E501 :type: dict(str, list[str]) """ - allowed_values = [ALL, CREATE, READ, WRITE, DELETE, RPC_CALL, READ_CREDENTIALS, WRITE_CREDENTIALS, READ_ATTRIBUTES, WRITE_ATTRIBUTES, READ_TELEMETRY, WRITE_TELEMETRY, ADD_TO_GROUP, REMOVE_FROM_GROUP, CHANGE_OWNER, IMPERSONATE, CLAIM_DEVICES, SHARE_GROUP] # noqa: E501 + allowed_values = [ALL, CREATE, READ, WRITE, DELETE, RPC_CALL, READ_CREDENTIALS, WRITE_CREDENTIALS, READ_ATTRIBUTES, WRITE_ATTRIBUTES, READ_TELEMETRY, WRITE_TELEMETRY, ADD_TO_GROUP, REMOVE_FROM_GROUP, CHANGE_OWNER, IMPERSONATE, CLAIM_DEVICES, SHARE_GROUP, ASSIGN_TO_TENANT] # noqa: E501 if not set(generic_permissions.keys()).issubset(set(allowed_values)): raise ValueError( "Invalid keys in `generic_permissions` [{0}], must be a subset of [{1}]" # noqa: E501 @@ -107,6 +116,48 @@ def group_permissions(self, group_permissions): self._group_permissions = group_permissions + @property + def read_attr_permissions(self): + """Gets the read_attr_permissions of this MergedUserPermissions. # noqa: E501 + + + :return: The read_attr_permissions of this MergedUserPermissions. # noqa: E501 + :rtype: dict(str, MergedGroupTypePermissionInfo) + """ + return self._read_attr_permissions + + @read_attr_permissions.setter + def read_attr_permissions(self, read_attr_permissions): + """Sets the read_attr_permissions of this MergedUserPermissions. + + + :param read_attr_permissions: The read_attr_permissions of this MergedUserPermissions. # noqa: E501 + :type: dict(str, MergedGroupTypePermissionInfo) + """ + + self._read_attr_permissions = read_attr_permissions + + @property + def read_entity_permissions(self): + """Gets the read_entity_permissions of this MergedUserPermissions. # noqa: E501 + + + :return: The read_entity_permissions of this MergedUserPermissions. # noqa: E501 + :rtype: dict(str, MergedGroupTypePermissionInfo) + """ + return self._read_entity_permissions + + @read_entity_permissions.setter + def read_entity_permissions(self, read_entity_permissions): + """Sets the read_entity_permissions of this MergedUserPermissions. + + + :param read_entity_permissions: The read_entity_permissions of this MergedUserPermissions. # noqa: E501 + :type: dict(str, MergedGroupTypePermissionInfo) + """ + + self._read_entity_permissions = read_entity_permissions + @property def read_group_permissions(self): """Gets the read_group_permissions of this MergedUserPermissions. # noqa: E501 @@ -128,6 +179,27 @@ def read_group_permissions(self, read_group_permissions): self._read_group_permissions = read_group_permissions + @property + def read_ts_permissions(self): + """Gets the read_ts_permissions of this MergedUserPermissions. # noqa: E501 + + + :return: The read_ts_permissions of this MergedUserPermissions. # noqa: E501 + :rtype: dict(str, MergedGroupTypePermissionInfo) + """ + return self._read_ts_permissions + + @read_ts_permissions.setter + def read_ts_permissions(self, read_ts_permissions): + """Sets the read_ts_permissions of this MergedUserPermissions. + + + :param read_ts_permissions: The read_ts_permissions of this MergedUserPermissions. # noqa: E501 + :type: dict(str, MergedGroupTypePermissionInfo) + """ + + self._read_ts_permissions = read_ts_permissions + def to_dict(self): """Returns the model properties as a dict""" result = {} 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 new file mode 100644 index 00000000..e0948ada --- /dev/null +++ b/tb_rest_client/models/models_pe/o_auth2_basic_mapper_config.py @@ -0,0 +1,350 @@ +# 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 OAuth2BasicMapperConfig(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 = { + 'always_full_screen': 'bool', + 'customer_name_pattern': 'str', + 'default_dashboard_name': 'str', + 'email_attribute_key': 'str', + 'first_name_attribute_key': 'str', + 'last_name_attribute_key': 'str', + 'parent_customer_name_pattern': 'str', + 'tenant_name_pattern': 'str', + 'tenant_name_strategy': 'str', + 'user_groups_name_pattern': 'list[str]' + } + + attribute_map = { + 'always_full_screen': 'alwaysFullScreen', + 'customer_name_pattern': 'customerNamePattern', + 'default_dashboard_name': 'defaultDashboardName', + 'email_attribute_key': 'emailAttributeKey', + 'first_name_attribute_key': 'firstNameAttributeKey', + 'last_name_attribute_key': 'lastNameAttributeKey', + 'parent_customer_name_pattern': 'parentCustomerNamePattern', + 'tenant_name_pattern': 'tenantNamePattern', + 'tenant_name_strategy': 'tenantNameStrategy', + 'user_groups_name_pattern': 'userGroupsNamePattern' + } + + def __init__(self, always_full_screen=None, customer_name_pattern=None, default_dashboard_name=None, email_attribute_key=None, first_name_attribute_key=None, last_name_attribute_key=None, parent_customer_name_pattern=None, tenant_name_pattern=None, tenant_name_strategy=None, user_groups_name_pattern=None): # noqa: E501 + """OAuth2BasicMapperConfig - a model defined in Swagger""" # noqa: E501 + self._always_full_screen = None + self._customer_name_pattern = None + self._default_dashboard_name = None + self._email_attribute_key = None + self._first_name_attribute_key = None + self._last_name_attribute_key = None + self._parent_customer_name_pattern = None + self._tenant_name_pattern = None + self._tenant_name_strategy = None + self._user_groups_name_pattern = None + self.discriminator = None + if always_full_screen is not None: + self.always_full_screen = always_full_screen + if customer_name_pattern is not None: + self.customer_name_pattern = customer_name_pattern + if default_dashboard_name is not None: + self.default_dashboard_name = default_dashboard_name + if email_attribute_key is not None: + self.email_attribute_key = email_attribute_key + if first_name_attribute_key is not None: + self.first_name_attribute_key = first_name_attribute_key + if last_name_attribute_key is not None: + self.last_name_attribute_key = last_name_attribute_key + if parent_customer_name_pattern is not None: + self.parent_customer_name_pattern = parent_customer_name_pattern + if tenant_name_pattern is not None: + self.tenant_name_pattern = tenant_name_pattern + if tenant_name_strategy is not None: + self.tenant_name_strategy = tenant_name_strategy + if user_groups_name_pattern is not None: + self.user_groups_name_pattern = user_groups_name_pattern + + @property + def always_full_screen(self): + """Gets the always_full_screen of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The always_full_screen of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: bool + """ + return self._always_full_screen + + @always_full_screen.setter + def always_full_screen(self, always_full_screen): + """Sets the always_full_screen of this OAuth2BasicMapperConfig. + + + :param always_full_screen: The always_full_screen of this OAuth2BasicMapperConfig. # noqa: E501 + :type: bool + """ + + self._always_full_screen = always_full_screen + + @property + def customer_name_pattern(self): + """Gets the customer_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The customer_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._customer_name_pattern + + @customer_name_pattern.setter + def customer_name_pattern(self, customer_name_pattern): + """Sets the customer_name_pattern of this OAuth2BasicMapperConfig. + + + :param customer_name_pattern: The customer_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._customer_name_pattern = customer_name_pattern + + @property + def default_dashboard_name(self): + """Gets the default_dashboard_name of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The default_dashboard_name of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._default_dashboard_name + + @default_dashboard_name.setter + def default_dashboard_name(self, default_dashboard_name): + """Sets the default_dashboard_name of this OAuth2BasicMapperConfig. + + + :param default_dashboard_name: The default_dashboard_name of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._default_dashboard_name = default_dashboard_name + + @property + def email_attribute_key(self): + """Gets the email_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The email_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._email_attribute_key + + @email_attribute_key.setter + def email_attribute_key(self, email_attribute_key): + """Sets the email_attribute_key of this OAuth2BasicMapperConfig. + + + :param email_attribute_key: The email_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._email_attribute_key = email_attribute_key + + @property + def first_name_attribute_key(self): + """Gets the first_name_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The first_name_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._first_name_attribute_key + + @first_name_attribute_key.setter + def first_name_attribute_key(self, first_name_attribute_key): + """Sets the first_name_attribute_key of this OAuth2BasicMapperConfig. + + + :param first_name_attribute_key: The first_name_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._first_name_attribute_key = first_name_attribute_key + + @property + def last_name_attribute_key(self): + """Gets the last_name_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The last_name_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._last_name_attribute_key + + @last_name_attribute_key.setter + def last_name_attribute_key(self, last_name_attribute_key): + """Sets the last_name_attribute_key of this OAuth2BasicMapperConfig. + + + :param last_name_attribute_key: The last_name_attribute_key of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._last_name_attribute_key = last_name_attribute_key + + @property + def parent_customer_name_pattern(self): + """Gets the parent_customer_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The parent_customer_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._parent_customer_name_pattern + + @parent_customer_name_pattern.setter + def parent_customer_name_pattern(self, parent_customer_name_pattern): + """Sets the parent_customer_name_pattern of this OAuth2BasicMapperConfig. + + + :param parent_customer_name_pattern: The parent_customer_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._parent_customer_name_pattern = parent_customer_name_pattern + + @property + def tenant_name_pattern(self): + """Gets the tenant_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The tenant_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._tenant_name_pattern + + @tenant_name_pattern.setter + def tenant_name_pattern(self, tenant_name_pattern): + """Sets the tenant_name_pattern of this OAuth2BasicMapperConfig. + + + :param tenant_name_pattern: The tenant_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + + self._tenant_name_pattern = tenant_name_pattern + + @property + def tenant_name_strategy(self): + """Gets the tenant_name_strategy of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The tenant_name_strategy of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: str + """ + return self._tenant_name_strategy + + @tenant_name_strategy.setter + def tenant_name_strategy(self, tenant_name_strategy): + """Sets the tenant_name_strategy of this OAuth2BasicMapperConfig. + + + :param tenant_name_strategy: The tenant_name_strategy of this OAuth2BasicMapperConfig. # noqa: E501 + :type: str + """ + allowed_values = ["DOMAIN", "EMAIL", "CUSTOM"] # noqa: E501 + if tenant_name_strategy not in allowed_values: + raise ValueError( + "Invalid value for `tenant_name_strategy` ({0}), must be one of {1}" # noqa: E501 + .format(tenant_name_strategy, allowed_values) + ) + + self._tenant_name_strategy = tenant_name_strategy + + @property + def user_groups_name_pattern(self): + """Gets the user_groups_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + + + :return: The user_groups_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + :rtype: list[str] + """ + return self._user_groups_name_pattern + + @user_groups_name_pattern.setter + def user_groups_name_pattern(self, user_groups_name_pattern): + """Sets the user_groups_name_pattern of this OAuth2BasicMapperConfig. + + + :param user_groups_name_pattern: The user_groups_name_pattern of this OAuth2BasicMapperConfig. # noqa: E501 + :type: list[str] + """ + + self._user_groups_name_pattern = user_groups_name_pattern + + 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(OAuth2BasicMapperConfig, 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, OAuth2BasicMapperConfig): + 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/o_auth2_clients_domain_params.py b/tb_rest_client/models/models_pe/o_auth2_clients_domain_params.py new file mode 100644 index 00000000..c8c4ee80 --- /dev/null +++ b/tb_rest_client/models/models_pe/o_auth2_clients_domain_params.py @@ -0,0 +1,136 @@ +# 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 OAuth2ClientsDomainParams(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 = { + 'client_registrations': 'list[ClientRegistrationDto]', + 'domain_infos': 'list[DomainInfo]' + } + + attribute_map = { + 'client_registrations': 'clientRegistrations', + 'domain_infos': 'domainInfos' + } + + def __init__(self, client_registrations=None, domain_infos=None): # noqa: E501 + """OAuth2ClientsDomainParams - a model defined in Swagger""" # noqa: E501 + self._client_registrations = None + self._domain_infos = None + self.discriminator = None + if client_registrations is not None: + self.client_registrations = client_registrations + if domain_infos is not None: + self.domain_infos = domain_infos + + @property + def client_registrations(self): + """Gets the client_registrations of this OAuth2ClientsDomainParams. # noqa: E501 + + + :return: The client_registrations of this OAuth2ClientsDomainParams. # noqa: E501 + :rtype: list[ClientRegistrationDto] + """ + return self._client_registrations + + @client_registrations.setter + def client_registrations(self, client_registrations): + """Sets the client_registrations of this OAuth2ClientsDomainParams. + + + :param client_registrations: The client_registrations of this OAuth2ClientsDomainParams. # noqa: E501 + :type: list[ClientRegistrationDto] + """ + + self._client_registrations = client_registrations + + @property + def domain_infos(self): + """Gets the domain_infos of this OAuth2ClientsDomainParams. # noqa: E501 + + + :return: The domain_infos of this OAuth2ClientsDomainParams. # noqa: E501 + :rtype: list[DomainInfo] + """ + return self._domain_infos + + @domain_infos.setter + def domain_infos(self, domain_infos): + """Sets the domain_infos of this OAuth2ClientsDomainParams. + + + :param domain_infos: The domain_infos of this OAuth2ClientsDomainParams. # noqa: E501 + :type: list[DomainInfo] + """ + + self._domain_infos = domain_infos + + 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(OAuth2ClientsDomainParams, 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, OAuth2ClientsDomainParams): + 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/o_auth2_clients_params.py b/tb_rest_client/models/models_pe/o_auth2_clients_params.py new file mode 100644 index 00000000..1b6e289a --- /dev/null +++ b/tb_rest_client/models/models_pe/o_auth2_clients_params.py @@ -0,0 +1,136 @@ +# 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 OAuth2ClientsParams(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 = { + 'domains_params': 'list[OAuth2ClientsDomainParams]', + 'enabled': 'bool' + } + + attribute_map = { + 'domains_params': 'domainsParams', + 'enabled': 'enabled' + } + + def __init__(self, domains_params=None, enabled=None): # noqa: E501 + """OAuth2ClientsParams - a model defined in Swagger""" # noqa: E501 + self._domains_params = None + self._enabled = None + self.discriminator = None + if domains_params is not None: + self.domains_params = domains_params + if enabled is not None: + self.enabled = enabled + + @property + def domains_params(self): + """Gets the domains_params of this OAuth2ClientsParams. # noqa: E501 + + + :return: The domains_params of this OAuth2ClientsParams. # noqa: E501 + :rtype: list[OAuth2ClientsDomainParams] + """ + return self._domains_params + + @domains_params.setter + def domains_params(self, domains_params): + """Sets the domains_params of this OAuth2ClientsParams. + + + :param domains_params: The domains_params of this OAuth2ClientsParams. # noqa: E501 + :type: list[OAuth2ClientsDomainParams] + """ + + self._domains_params = domains_params + + @property + def enabled(self): + """Gets the enabled of this OAuth2ClientsParams. # noqa: E501 + + + :return: The enabled of this OAuth2ClientsParams. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this OAuth2ClientsParams. + + + :param enabled: The enabled of this OAuth2ClientsParams. # 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(OAuth2ClientsParams, 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, OAuth2ClientsParams): + 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_blob_entity_with_customer_info.py b/tb_rest_client/models/models_pe/page_data_blob_entity_with_customer_info.py index 04c36f2f..00cc2748 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 PageDataBlobEntityWithCustomerInfo(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 @@ -47,13 +43,11 @@ class PageDataBlobEntityWithCustomerInfo(object): def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 """PageDataBlobEntityWithCustomerInfo - a model defined in Swagger""" # noqa: E501 - self._data = None self._has_next = None self._total_elements = None self._total_pages = None self.discriminator = None - if data is not None: self.data = data if has_next is not None: 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 afc2b6e6..40ff74ef 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 PageDataContactBasedobject(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 @@ -47,13 +43,11 @@ class PageDataContactBasedobject(object): def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 """PageDataContactBasedobject - a model defined in Swagger""" # noqa: E501 - self._data = None self._has_next = None self._total_elements = None self._total_pages = None self.discriminator = None - if data is not None: self.data = data if has_next is not None: 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 9ab2efcf..37b0fdc0 100644 --- a/tb_rest_client/models/models_pe/page_data_converter.py +++ b/tb_rest_client/models/models_pe/page_data_converter.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 PageDataConverter(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 @@ -47,13 +43,11 @@ class PageDataConverter(object): def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 """PageDataConverter - a model defined in Swagger""" # noqa: E501 - self._data = None self._has_next = None self._total_elements = None self._total_pages = None self.discriminator = None - if data is not None: self.data = data if has_next is not None: 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 new file mode 100644 index 00000000..4fc975b4 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_entity_group_info.py @@ -0,0 +1,188 @@ +# 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 PageDataEntityGroupInfo(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[EntityGroupInfo]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataEntityGroupInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataEntityGroupInfo. # noqa: E501 + + + :return: The data of this PageDataEntityGroupInfo. # noqa: E501 + :rtype: list[EntityGroupInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataEntityGroupInfo. + + + :param data: The data of this PageDataEntityGroupInfo. # noqa: E501 + :type: list[EntityGroupInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataEntityGroupInfo. # noqa: E501 + + + :return: The has_next of this PageDataEntityGroupInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataEntityGroupInfo. + + + :param has_next: The has_next of this PageDataEntityGroupInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataEntityGroupInfo. # noqa: E501 + + + :return: The total_elements of this PageDataEntityGroupInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataEntityGroupInfo. + + + :param total_elements: The total_elements of this PageDataEntityGroupInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataEntityGroupInfo. # noqa: E501 + + + :return: The total_pages of this PageDataEntityGroupInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataEntityGroupInfo. + + + :param total_pages: The total_pages of this PageDataEntityGroupInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataEntityGroupInfo, 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, PageDataEntityGroupInfo): + 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 e1705470..318a9ffc 100644 --- a/tb_rest_client/models/models_pe/page_data_integration.py +++ b/tb_rest_client/models/models_pe/page_data_integration.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 PageDataIntegration(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 @@ -47,13 +43,11 @@ class PageDataIntegration(object): def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 """PageDataIntegration - a model defined in Swagger""" # noqa: E501 - self._data = None self._has_next = None self._total_elements = None self._total_pages = None self.discriminator = None - if data is not None: self.data = data if has_next is not None: 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 c8a8bc99..9471f962 100644 --- a/tb_rest_client/models/models_pe/page_data_role.py +++ b/tb_rest_client/models/models_pe/page_data_role.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 PageDataRole(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 @@ -47,13 +43,11 @@ class PageDataRole(object): def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 """PageDataRole - a model defined in Swagger""" # noqa: E501 - self._data = None self._has_next = None self._total_elements = None self._total_pages = None self.discriminator = None - if data is not None: self.data = data if has_next is not None: 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 new file mode 100644 index 00000000..d5760237 --- /dev/null +++ b/tb_rest_client/models/models_pe/page_data_scheduler_event_info.py @@ -0,0 +1,188 @@ +# 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 PageDataSchedulerEventInfo(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[SchedulerEventInfo]', + 'has_next': 'bool', + 'total_elements': 'int', + 'total_pages': 'int' + } + + attribute_map = { + 'data': 'data', + 'has_next': 'hasNext', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages' + } + + def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 + """PageDataSchedulerEventInfo - a model defined in Swagger""" # noqa: E501 + self._data = None + self._has_next = None + self._total_elements = None + self._total_pages = None + self.discriminator = None + if data is not None: + self.data = data + if has_next is not None: + self.has_next = has_next + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + + @property + def data(self): + """Gets the data of this PageDataSchedulerEventInfo. # noqa: E501 + + + :return: The data of this PageDataSchedulerEventInfo. # noqa: E501 + :rtype: list[SchedulerEventInfo] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PageDataSchedulerEventInfo. + + + :param data: The data of this PageDataSchedulerEventInfo. # noqa: E501 + :type: list[SchedulerEventInfo] + """ + + self._data = data + + @property + def has_next(self): + """Gets the has_next of this PageDataSchedulerEventInfo. # noqa: E501 + + + :return: The has_next of this PageDataSchedulerEventInfo. # noqa: E501 + :rtype: bool + """ + return self._has_next + + @has_next.setter + def has_next(self, has_next): + """Sets the has_next of this PageDataSchedulerEventInfo. + + + :param has_next: The has_next of this PageDataSchedulerEventInfo. # noqa: E501 + :type: bool + """ + + self._has_next = has_next + + @property + def total_elements(self): + """Gets the total_elements of this PageDataSchedulerEventInfo. # noqa: E501 + + + :return: The total_elements of this PageDataSchedulerEventInfo. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDataSchedulerEventInfo. + + + :param total_elements: The total_elements of this PageDataSchedulerEventInfo. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDataSchedulerEventInfo. # noqa: E501 + + + :return: The total_pages of this PageDataSchedulerEventInfo. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDataSchedulerEventInfo. + + + :param total_pages: The total_pages of this PageDataSchedulerEventInfo. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + 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(PageDataSchedulerEventInfo, 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, PageDataSchedulerEventInfo): + 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_short_entity_view.py b/tb_rest_client/models/models_pe/page_data_short_entity_view.py index 2813765a..936c77c7 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 PageDataShortEntityView(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -47,13 +43,11 @@ class PageDataShortEntityView(object): def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 """PageDataShortEntityView - a model defined in Swagger""" # noqa: E501 - self._data = None self._has_next = None self._total_elements = None self._total_pages = None self.discriminator = None - if data is not None: self.data = data if has_next is not None: diff --git a/tb_rest_client/models/models_pe/palette.py b/tb_rest_client/models/models_pe/palette.py index b5e4f86c..b78364ce 100644 --- a/tb_rest_client/models/models_pe/palette.py +++ b/tb_rest_client/models/models_pe/palette.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Palette(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 @@ -45,12 +41,10 @@ class Palette(object): def __init__(self, colors=None, extends=None, type=None): # noqa: E501 """Palette - a model defined in Swagger""" # noqa: E501 - self._colors = None self._extends = None self._type = None self.discriminator = None - if colors is not None: self.colors = colors if extends is not None: diff --git a/tb_rest_client/models/models_pe/palette_settings.py b/tb_rest_client/models/models_pe/palette_settings.py index cb25932b..aa5e9dd2 100644 --- a/tb_rest_client/models/models_pe/palette_settings.py +++ b/tb_rest_client/models/models_pe/palette_settings.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 PaletteSettings(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 @@ -43,11 +39,9 @@ class PaletteSettings(object): def __init__(self, accent_palette=None, primary_palette=None): # noqa: E501 """PaletteSettings - a model defined in Swagger""" # noqa: E501 - self._accent_palette = None self._primary_palette = None self.discriminator = None - if accent_palette is not None: self.accent_palette = accent_palette if primary_palette is not None: 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 new file mode 100644 index 00000000..02261c57 --- /dev/null +++ b/tb_rest_client/models/models_pe/relation_entity_type_filter.py @@ -0,0 +1,145 @@ +# 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 RelationEntityTypeFilter(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 = { + 'relation_type': 'str', + 'entity_types': 'list[str]' + } + + attribute_map = { + 'relation_type': 'relationType', + 'entity_types': 'entityTypes' + } + + def __init__(self, relation_type=None, entity_types=None): # noqa: E501 + """RelationEntityTypeFilter - a model defined in Swagger""" # noqa: E501 + self._relation_type = None + self._entity_types = None + self.discriminator = None + self.relation_type = relation_type + self.entity_types = entity_types + + @property + def relation_type(self): + """Gets the relation_type of this RelationEntityTypeFilter. # noqa: E501 + + + :return: The relation_type of this RelationEntityTypeFilter. # noqa: E501 + :rtype: str + """ + return self._relation_type + + @relation_type.setter + def relation_type(self, relation_type): + """Sets the relation_type of this RelationEntityTypeFilter. + + + :param relation_type: The relation_type of this RelationEntityTypeFilter. # noqa: E501 + :type: str + """ + if relation_type is None: + raise ValueError("Invalid value for `relation_type`, must not be `None`") # noqa: E501 + + self._relation_type = relation_type + + @property + def entity_types(self): + """Gets the entity_types of this RelationEntityTypeFilter. # noqa: E501 + + + :return: The entity_types of this RelationEntityTypeFilter. # noqa: E501 + :rtype: list[str] + """ + return self._entity_types + + @entity_types.setter + def entity_types(self, entity_types): + """Sets the entity_types of this RelationEntityTypeFilter. + + + :param entity_types: The entity_types of this RelationEntityTypeFilter. # noqa: E501 + :type: list[str] + """ + if entity_types is None: + raise ValueError("Invalid value for `entity_types`, must not be `None`") # noqa: E501 + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # 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 + + 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(RelationEntityTypeFilter, 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, RelationEntityTypeFilter): + 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/relations_search_parameters.py b/tb_rest_client/models/models_pe/relations_search_parameters.py index d57c7cb2..10bd1a3f 100644 --- a/tb_rest_client/models/models_pe/relations_search_parameters.py +++ b/tb_rest_client/models/models_pe/relations_search_parameters.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 RelationsSearchParameters(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -53,7 +49,6 @@ class RelationsSearchParameters(object): def __init__(self, entity_id=None, root_id=None, root_type=None, direction=None, relation_type_group=None, max_level=None, fetch_last_level_only=None): # noqa: E501 """RelationsSearchParameters - a model defined in Swagger""" # noqa: E501 - self._entity_id = None self._root_id = None self._root_type = None @@ -62,7 +57,6 @@ def __init__(self, entity_id=None, root_id=None, root_type=None, direction=None, self._max_level = None self._fetch_last_level_only = None self.discriminator = None - if entity_id is not None: self.entity_id = entity_id self.root_id = root_id @@ -136,7 +130,7 @@ def root_type(self, root_type): """ if root_type is None: raise ValueError("Invalid value for `root_type`, must not be `None`") # noqa: E501 - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # noqa: E501 + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # noqa: E501 if root_type not in allowed_values: raise ValueError( "Invalid value for `root_type` ({0}), must be one of {1}" # noqa: E501 @@ -194,7 +188,7 @@ def relation_type_group(self, relation_type_group): """ if relation_type_group is None: raise ValueError("Invalid value for `relation_type_group`, must not be `None`") # noqa: E501 - allowed_values = ["COMMON", "ALARM", "DASHBOARD", "TO_ENTITY_GROUP", "FROM_ENTITY_GROUP", "RULE_CHAIN", "RULE_NODE"] # noqa: E501 + allowed_values = ["COMMON", "ALARM", "DASHBOARD", "TO_ENTITY_GROUP", "FROM_ENTITY_GROUP", "RULE_CHAIN", "RULE_NODE", "EDGE", "EDGE_AUTO_ASSIGN_RULE_CHAIN"] # noqa: E501 if relation_type_group not in allowed_values: raise ValueError( "Invalid value for `relation_type_group` ({0}), must be one of {1}" # noqa: E501 diff --git a/tb_rest_client/models/models_pe/report_config.py b/tb_rest_client/models/models_pe/report_config.py index adf4a08b..3ab58b9c 100644 --- a/tb_rest_client/models/models_pe/report_config.py +++ b/tb_rest_client/models/models_pe/report_config.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 ReportConfig(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -59,7 +55,6 @@ class ReportConfig(object): def __init__(self, base_url=None, dashboard_id=None, name_pattern=None, state=None, timewindow=None, timezone=None, type=None, use_current_user_credentials=None, use_dashboard_timewindow=None, user_id=None): # noqa: E501 """ReportConfig - a model defined in Swagger""" # noqa: E501 - self._base_url = None self._dashboard_id = None self._name_pattern = None @@ -71,7 +66,6 @@ def __init__(self, base_url=None, dashboard_id=None, name_pattern=None, state=No self._use_dashboard_timewindow = None self._user_id = None self.discriminator = None - if base_url is not None: self.base_url = base_url if dashboard_id is not None: diff --git a/tb_rest_client/models/models_pe/role.py b/tb_rest_client/models/models_pe/role.py index 977c35a6..2b31a99e 100644 --- a/tb_rest_client/models/models_pe/role.py +++ b/tb_rest_client/models/models_pe/role.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 Role(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -57,7 +53,6 @@ class Role(object): def __init__(self, additional_info=None, created_time=None, customer_id=None, id=None, name=None, owner_id=None, permissions=None, tenant_id=None, type=None): # noqa: E501 """Role - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._created_time = None self._customer_id = None @@ -68,7 +63,6 @@ def __init__(self, additional_info=None, created_time=None, customer_id=None, id self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if created_time is not None: diff --git a/tb_rest_client/models/models_pe/role_id.py b/tb_rest_client/models/models_pe/role_id.py new file mode 100644 index 00000000..27ac225d --- /dev/null +++ b/tb_rest_client/models/models_pe/role_id.py @@ -0,0 +1,142 @@ +# 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 RoleId(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 = { + 'entity_type': 'str', + 'id': 'str' + } + + attribute_map = { + 'entity_type': 'entityType', + 'id': 'id' + } + + def __init__(self, entity_type=None, id=None): # noqa: E501 + """RoleId - a model defined in Swagger""" # noqa: E501 + self._entity_type = None + self._id = None + self.discriminator = None + if entity_type is not None: + self.entity_type = entity_type + if id is not None: + self.id = id + + @property + def entity_type(self): + """Gets the entity_type of this RoleId. # noqa: E501 + + + :return: The entity_type of this RoleId. # noqa: E501 + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """Sets the entity_type of this RoleId. + + + :param entity_type: The entity_type of this RoleId. # noqa: E501 + :type: str + """ + allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION", "TENANT_PROFILE", "DEVICE_PROFILE", "API_USAGE_STATE", "TB_RESOURCE", "OTA_PACKAGE", "EDGE", "RPC"] # 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 id(self): + """Gets the id of this RoleId. # noqa: E501 + + + :return: The id of this RoleId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this RoleId. + + + :param id: The id of this RoleId. # noqa: E501 + :type: str + """ + + 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(RoleId, 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, RoleId): + 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.py b/tb_rest_client/models/models_pe/scheduler_event.py index b81f3ed6..85080f7c 100644 --- a/tb_rest_client/models/models_pe/scheduler_event.py +++ b/tb_rest_client/models/models_pe/scheduler_event.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 SchedulerEvent(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -59,7 +55,6 @@ class SchedulerEvent(object): def __init__(self, additional_info=None, configuration=None, created_time=None, customer_id=None, id=None, name=None, owner_id=None, schedule=None, tenant_id=None, type=None): # noqa: E501 """SchedulerEvent - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._configuration = None self._created_time = None @@ -71,7 +66,6 @@ def __init__(self, additional_info=None, configuration=None, created_time=None, self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if configuration is not None: diff --git a/tb_rest_client/models/models_pe/scheduler_event_id.py b/tb_rest_client/models/models_pe/scheduler_event_id.py new file mode 100644 index 00000000..d4129e87 --- /dev/null +++ b/tb_rest_client/models/models_pe/scheduler_event_id.py @@ -0,0 +1,110 @@ +# 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 SchedulerEventId(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 + """SchedulerEventId - a model defined in Swagger""" # noqa: E501 + self._id = None + self.discriminator = None + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this SchedulerEventId. # noqa: E501 + + + :return: The id of this SchedulerEventId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SchedulerEventId. + + + :param id: The id of this SchedulerEventId. # noqa: E501 + :type: str + """ + + 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(SchedulerEventId, 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, SchedulerEventId): + 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_info.py b/tb_rest_client/models/models_pe/scheduler_event_info.py index 4dea1613..d2b7750d 100644 --- a/tb_rest_client/models/models_pe/scheduler_event_info.py +++ b/tb_rest_client/models/models_pe/scheduler_event_info.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 SchedulerEventInfo(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 @@ -57,7 +53,6 @@ class SchedulerEventInfo(object): def __init__(self, additional_info=None, created_time=None, customer_id=None, id=None, name=None, owner_id=None, schedule=None, tenant_id=None, type=None): # noqa: E501 """SchedulerEventInfo - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._created_time = None self._customer_id = None @@ -68,7 +63,6 @@ def __init__(self, additional_info=None, created_time=None, customer_id=None, id self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if created_time is not None: 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 3c9188ee..f632eeda 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 SchedulerEventWithCustomerInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -61,7 +57,6 @@ class SchedulerEventWithCustomerInfo(object): def __init__(self, additional_info=None, created_time=None, customer_id=None, customer_is_public=None, customer_title=None, id=None, name=None, owner_id=None, schedule=None, tenant_id=None, type=None): # noqa: E501 """SchedulerEventWithCustomerInfo - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._created_time = None self._customer_id = None @@ -74,7 +69,6 @@ def __init__(self, additional_info=None, created_time=None, customer_id=None, cu self._tenant_id = None self._type = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if created_time is not None: 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 0556ec8d..2af368ce 100644 --- a/tb_rest_client/models/models_pe/self_registration_params.py +++ b/tb_rest_client/models/models_pe/self_registration_params.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 SelfRegistrationParams(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -33,6 +29,9 @@ class SelfRegistrationParams(object): """ swagger_types = { 'admin_settings_id': 'str', + 'app_host': 'str', + 'app_scheme': 'str', + 'app_secret': 'str', 'captcha_secret_key': 'str', 'captcha_site_key': 'str', 'default_dashboard_fullscreen': 'bool', @@ -40,12 +39,16 @@ class SelfRegistrationParams(object): 'domain_name': 'str', 'notification_email': 'str', 'permissions': 'list[GroupPermission]', + 'pkg_name': 'str', 'privacy_policy': 'str', 'sign_up_text_message': 'str' } attribute_map = { 'admin_settings_id': 'adminSettingsId', + 'app_host': 'appHost', + 'app_scheme': 'appScheme', + 'app_secret': 'appSecret', 'captcha_secret_key': 'captchaSecretKey', 'captcha_site_key': 'captchaSiteKey', 'default_dashboard_fullscreen': 'defaultDashboardFullscreen', @@ -53,14 +56,17 @@ class SelfRegistrationParams(object): 'domain_name': 'domainName', 'notification_email': 'notificationEmail', 'permissions': 'permissions', + 'pkg_name': 'pkgName', 'privacy_policy': 'privacyPolicy', 'sign_up_text_message': 'signUpTextMessage' } - def __init__(self, admin_settings_id=None, captcha_secret_key=None, captcha_site_key=None, default_dashboard_fullscreen=None, default_dashboard_id=None, domain_name=None, notification_email=None, permissions=None, privacy_policy=None, sign_up_text_message=None): # noqa: E501 + def __init__(self, admin_settings_id=None, app_host=None, app_scheme=None, app_secret=None, captcha_secret_key=None, captcha_site_key=None, default_dashboard_fullscreen=None, default_dashboard_id=None, domain_name=None, notification_email=None, permissions=None, pkg_name=None, privacy_policy=None, sign_up_text_message=None): # noqa: E501 """SelfRegistrationParams - a model defined in Swagger""" # noqa: E501 - self._admin_settings_id = None + self._app_host = None + self._app_scheme = None + self._app_secret = None self._captcha_secret_key = None self._captcha_site_key = None self._default_dashboard_fullscreen = None @@ -68,12 +74,18 @@ def __init__(self, admin_settings_id=None, captcha_secret_key=None, captcha_site self._domain_name = None self._notification_email = None self._permissions = None + self._pkg_name = None self._privacy_policy = None self._sign_up_text_message = None self.discriminator = None - if admin_settings_id is not None: self.admin_settings_id = admin_settings_id + if app_host is not None: + self.app_host = app_host + if app_scheme is not None: + self.app_scheme = app_scheme + if app_secret is not None: + self.app_secret = app_secret if captcha_secret_key is not None: self.captcha_secret_key = captcha_secret_key if captcha_site_key is not None: @@ -88,6 +100,8 @@ def __init__(self, admin_settings_id=None, captcha_secret_key=None, captcha_site self.notification_email = notification_email if permissions is not None: self.permissions = permissions + if pkg_name is not None: + self.pkg_name = pkg_name if privacy_policy is not None: self.privacy_policy = privacy_policy if sign_up_text_message is not None: @@ -114,6 +128,69 @@ def admin_settings_id(self, admin_settings_id): self._admin_settings_id = admin_settings_id + @property + def app_host(self): + """Gets the app_host of this SelfRegistrationParams. # noqa: E501 + + + :return: The app_host of this SelfRegistrationParams. # noqa: E501 + :rtype: str + """ + return self._app_host + + @app_host.setter + def app_host(self, app_host): + """Sets the app_host of this SelfRegistrationParams. + + + :param app_host: The app_host of this SelfRegistrationParams. # noqa: E501 + :type: str + """ + + self._app_host = app_host + + @property + def app_scheme(self): + """Gets the app_scheme of this SelfRegistrationParams. # noqa: E501 + + + :return: The app_scheme of this SelfRegistrationParams. # noqa: E501 + :rtype: str + """ + return self._app_scheme + + @app_scheme.setter + def app_scheme(self, app_scheme): + """Sets the app_scheme of this SelfRegistrationParams. + + + :param app_scheme: The app_scheme of this SelfRegistrationParams. # noqa: E501 + :type: str + """ + + self._app_scheme = app_scheme + + @property + def app_secret(self): + """Gets the app_secret of this SelfRegistrationParams. # noqa: E501 + + + :return: The app_secret of this SelfRegistrationParams. # noqa: E501 + :rtype: str + """ + return self._app_secret + + @app_secret.setter + def app_secret(self, app_secret): + """Sets the app_secret of this SelfRegistrationParams. + + + :param app_secret: The app_secret of this SelfRegistrationParams. # noqa: E501 + :type: str + """ + + self._app_secret = app_secret + @property def captcha_secret_key(self): """Gets the captcha_secret_key of this SelfRegistrationParams. # noqa: E501 @@ -261,6 +338,27 @@ def permissions(self, permissions): self._permissions = permissions + @property + def pkg_name(self): + """Gets the pkg_name of this SelfRegistrationParams. # noqa: E501 + + + :return: The pkg_name of this SelfRegistrationParams. # noqa: E501 + :rtype: str + """ + return self._pkg_name + + @pkg_name.setter + def pkg_name(self, pkg_name): + """Sets the pkg_name of this SelfRegistrationParams. + + + :param pkg_name: The pkg_name of this SelfRegistrationParams. # noqa: E501 + :type: str + """ + + self._pkg_name = pkg_name + @property def privacy_policy(self): """Gets the 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 new file mode 100644 index 00000000..329aca54 --- /dev/null +++ b/tb_rest_client/models/models_pe/share_group_request.py @@ -0,0 +1,245 @@ +# 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 ShareGroupRequest(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 = { + 'all_user_group': 'bool', + 'owner_id': 'EntityId', + 'is_all_user_group': 'bool', + 'user_group_id': 'EntityGroupId', + 'read_else_write': 'bool', + 'role_ids': 'list[RoleId]' + } + + attribute_map = { + 'all_user_group': 'allUserGroup', + 'owner_id': 'ownerId', + 'is_all_user_group': 'isAllUserGroup', + 'user_group_id': 'userGroupId', + 'read_else_write': 'readElseWrite', + 'role_ids': 'roleIds' + } + + def __init__(self, all_user_group=None, owner_id=None, is_all_user_group=None, user_group_id=None, read_else_write=None, role_ids=None): # noqa: E501 + """ShareGroupRequest - a model defined in Swagger""" # noqa: E501 + self._all_user_group = None + self._owner_id = None + self._is_all_user_group = None + self._user_group_id = None + self._read_else_write = None + self._role_ids = None + self.discriminator = None + if all_user_group is not None: + self.all_user_group = all_user_group + self.owner_id = owner_id + self.is_all_user_group = is_all_user_group + self.user_group_id = user_group_id + self.read_else_write = read_else_write + self.role_ids = role_ids + + @property + def all_user_group(self): + """Gets the all_user_group of this ShareGroupRequest. # noqa: E501 + + + :return: The all_user_group of this ShareGroupRequest. # noqa: E501 + :rtype: bool + """ + return self._all_user_group + + @all_user_group.setter + def all_user_group(self, all_user_group): + """Sets the all_user_group of this ShareGroupRequest. + + + :param all_user_group: The all_user_group of this ShareGroupRequest. # noqa: E501 + :type: bool + """ + + self._all_user_group = all_user_group + + @property + def owner_id(self): + """Gets the owner_id of this ShareGroupRequest. # noqa: E501 + + + :return: The owner_id of this ShareGroupRequest. # noqa: E501 + :rtype: EntityId + """ + return self._owner_id + + @owner_id.setter + def owner_id(self, owner_id): + """Sets the owner_id of this ShareGroupRequest. + + + :param owner_id: The owner_id of this ShareGroupRequest. # noqa: E501 + :type: EntityId + """ + if owner_id is None: + raise ValueError("Invalid value for `owner_id`, must not be `None`") # noqa: E501 + + self._owner_id = owner_id + + @property + def is_all_user_group(self): + """Gets the is_all_user_group of this ShareGroupRequest. # noqa: E501 + + + :return: The is_all_user_group of this ShareGroupRequest. # noqa: E501 + :rtype: bool + """ + return self._is_all_user_group + + @is_all_user_group.setter + def is_all_user_group(self, is_all_user_group): + """Sets the is_all_user_group of this ShareGroupRequest. + + + :param is_all_user_group: The is_all_user_group of this ShareGroupRequest. # noqa: E501 + :type: bool + """ + if is_all_user_group is None: + raise ValueError("Invalid value for `is_all_user_group`, must not be `None`") # noqa: E501 + + self._is_all_user_group = is_all_user_group + + @property + def user_group_id(self): + """Gets the user_group_id of this ShareGroupRequest. # noqa: E501 + + + :return: The user_group_id of this ShareGroupRequest. # noqa: E501 + :rtype: EntityGroupId + """ + return self._user_group_id + + @user_group_id.setter + def user_group_id(self, user_group_id): + """Sets the user_group_id of this ShareGroupRequest. + + + :param user_group_id: The user_group_id of this ShareGroupRequest. # noqa: E501 + :type: EntityGroupId + """ + if user_group_id is None: + raise ValueError("Invalid value for `user_group_id`, must not be `None`") # noqa: E501 + + self._user_group_id = user_group_id + + @property + def read_else_write(self): + """Gets the read_else_write of this ShareGroupRequest. # noqa: E501 + + + :return: The read_else_write of this ShareGroupRequest. # noqa: E501 + :rtype: bool + """ + return self._read_else_write + + @read_else_write.setter + def read_else_write(self, read_else_write): + """Sets the read_else_write of this ShareGroupRequest. + + + :param read_else_write: The read_else_write of this ShareGroupRequest. # noqa: E501 + :type: bool + """ + if read_else_write is None: + raise ValueError("Invalid value for `read_else_write`, must not be `None`") # noqa: E501 + + self._read_else_write = read_else_write + + @property + def role_ids(self): + """Gets the role_ids of this ShareGroupRequest. # noqa: E501 + + + :return: The role_ids of this ShareGroupRequest. # noqa: E501 + :rtype: list[RoleId] + """ + return self._role_ids + + @role_ids.setter + def role_ids(self, role_ids): + """Sets the role_ids of this ShareGroupRequest. + + + :param role_ids: The role_ids of this ShareGroupRequest. # noqa: E501 + :type: list[RoleId] + """ + if role_ids is None: + raise ValueError("Invalid value for `role_ids`, must not be `None`") # noqa: E501 + + self._role_ids = role_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(ShareGroupRequest, 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, ShareGroupRequest): + 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/short_entity_view.py b/tb_rest_client/models/models_pe/short_entity_view.py index 40110160..5ac17030 100644 --- a/tb_rest_client/models/models_pe/short_entity_view.py +++ b/tb_rest_client/models/models_pe/short_entity_view.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 ShortEntityView(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 @@ -43,11 +39,9 @@ class ShortEntityView(object): 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 - if id is not None: self.id = id if name is not None: 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 0bd7fc36..68eb337d 100644 --- a/tb_rest_client/models/models_pe/sign_up_request.py +++ b/tb_rest_client/models/models_pe/sign_up_request.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 SignUpRequest(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 @@ -32,31 +28,37 @@ class SignUpRequest(object): and the value is json key in definition. """ swagger_types = { + 'app_secret': 'str', 'email': 'str', 'first_name': 'str', 'last_name': 'str', 'password': 'str', + 'pkg_name': 'str', 'recaptcha_response': 'str' } attribute_map = { + 'app_secret': 'appSecret', 'email': 'email', 'first_name': 'firstName', 'last_name': 'lastName', 'password': 'password', + 'pkg_name': 'pkgName', 'recaptcha_response': 'recaptchaResponse' } - def __init__(self, email=None, first_name=None, last_name=None, password=None, recaptcha_response=None): # noqa: E501 + def __init__(self, app_secret=None, email=None, first_name=None, last_name=None, password=None, pkg_name=None, recaptcha_response=None): # noqa: E501 """SignUpRequest - a model defined in Swagger""" # noqa: E501 - + self._app_secret = None self._email = None self._first_name = None self._last_name = None self._password = None + self._pkg_name = None self._recaptcha_response = None self.discriminator = None - + if app_secret is not None: + self.app_secret = app_secret if email is not None: self.email = email if first_name is not None: @@ -65,9 +67,32 @@ def __init__(self, email=None, first_name=None, last_name=None, password=None, r self.last_name = last_name if password is not None: self.password = password + if pkg_name is not None: + self.pkg_name = pkg_name if recaptcha_response is not None: self.recaptcha_response = recaptcha_response + @property + def app_secret(self): + """Gets the app_secret of this SignUpRequest. # noqa: E501 + + + :return: The app_secret of this SignUpRequest. # noqa: E501 + :rtype: str + """ + return self._app_secret + + @app_secret.setter + def app_secret(self, app_secret): + """Sets the app_secret of this SignUpRequest. + + + :param app_secret: The app_secret of this SignUpRequest. # noqa: E501 + :type: str + """ + + self._app_secret = app_secret + @property def email(self): """Gets the email of this SignUpRequest. # noqa: E501 @@ -152,6 +177,27 @@ def password(self, password): self._password = password + @property + def pkg_name(self): + """Gets the pkg_name of this SignUpRequest. # noqa: E501 + + + :return: The pkg_name of this SignUpRequest. # noqa: E501 + :rtype: str + """ + return self._pkg_name + + @pkg_name.setter + def pkg_name(self, pkg_name): + """Sets the pkg_name of this SignUpRequest. + + + :param pkg_name: The pkg_name of this SignUpRequest. # noqa: E501 + :type: str + """ + + self._pkg_name = pkg_name + @property def recaptcha_response(self): """Gets the recaptcha_response of this SignUpRequest. # noqa: E501 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 66d11660..874ba2e0 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 @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 SignUpSelfRegistrationParams(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 @@ -43,11 +39,9 @@ class SignUpSelfRegistrationParams(object): def __init__(self, captcha_site_key=None, sign_up_text_message=None): # noqa: E501 """SignUpSelfRegistrationParams - a model defined in Swagger""" # noqa: E501 - self._captcha_site_key = None self._sign_up_text_message = None self.discriminator = None - if captcha_site_key is not None: self.captcha_site_key = captcha_site_key if sign_up_text_message is not None: diff --git a/tb_rest_client/models/models_pe/solution_install_response.py b/tb_rest_client/models/models_pe/solution_install_response.py new file mode 100644 index 00000000..2044d280 --- /dev/null +++ b/tb_rest_client/models/models_pe/solution_install_response.py @@ -0,0 +1,188 @@ +# 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 SolutionInstallResponse(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_group_id': 'EntityGroupId', + 'dashboard_id': 'DashboardId', + 'details': 'str', + 'success': 'bool' + } + + attribute_map = { + 'dashboard_group_id': 'dashboardGroupId', + 'dashboard_id': 'dashboardId', + 'details': 'details', + 'success': 'success' + } + + def __init__(self, dashboard_group_id=None, dashboard_id=None, details=None, success=None): # noqa: E501 + """SolutionInstallResponse - a model defined in Swagger""" # noqa: E501 + self._dashboard_group_id = None + self._dashboard_id = None + self._details = None + self._success = 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 success is not None: + self.success = success + + @property + def dashboard_group_id(self): + """Gets the dashboard_group_id of this SolutionInstallResponse. # noqa: E501 + + + :return: The dashboard_group_id of this SolutionInstallResponse. # noqa: E501 + :rtype: EntityGroupId + """ + return self._dashboard_group_id + + @dashboard_group_id.setter + def dashboard_group_id(self, dashboard_group_id): + """Sets the dashboard_group_id of this SolutionInstallResponse. + + + :param dashboard_group_id: The dashboard_group_id of this SolutionInstallResponse. # noqa: E501 + :type: EntityGroupId + """ + + self._dashboard_group_id = dashboard_group_id + + @property + def dashboard_id(self): + """Gets the dashboard_id of this SolutionInstallResponse. # noqa: E501 + + + :return: The dashboard_id of this SolutionInstallResponse. # noqa: E501 + :rtype: DashboardId + """ + return self._dashboard_id + + @dashboard_id.setter + def dashboard_id(self, dashboard_id): + """Sets the dashboard_id of this SolutionInstallResponse. + + + :param dashboard_id: The dashboard_id of this SolutionInstallResponse. # noqa: E501 + :type: DashboardId + """ + + self._dashboard_id = dashboard_id + + @property + def details(self): + """Gets the details of this SolutionInstallResponse. # 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. + + + :param details: The details of this SolutionInstallResponse. # noqa: E501 + :type: str + """ + + self._details = details + + @property + def success(self): + """Gets the success of this SolutionInstallResponse. # noqa: E501 + + + :return: The success of this SolutionInstallResponse. # noqa: E501 + :rtype: bool + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this SolutionInstallResponse. + + + :param success: The success of this SolutionInstallResponse. # noqa: E501 + :type: bool + """ + + self._success = success + + 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(SolutionInstallResponse, 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, SolutionInstallResponse): + 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/subscription_usage.py b/tb_rest_client/models/models_pe/subscription_usage.py index 787f2726..6d3e5245 100644 --- a/tb_rest_client/models/models_pe/subscription_usage.py +++ b/tb_rest_client/models/models_pe/subscription_usage.py @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class SubscriptionUsage(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 @@ -68,12 +65,8 @@ class SubscriptionUsage(object): 'users': 'users' } - def __init__(self, assets=None, converters=None, customers=None, dashboards=None, devices=None, dp_storage_days=None, emails=None, integrations=None, js_executions=None, re_executions=None, rule_chains=None, scheduler_events=None, sms=None, transport_data_points=None, transport_messages=None, users=None, _configuration=None): # noqa: E501 + def __init__(self, assets=None, converters=None, customers=None, dashboards=None, devices=None, dp_storage_days=None, emails=None, integrations=None, js_executions=None, re_executions=None, rule_chains=None, scheduler_events=None, sms=None, transport_data_points=None, transport_messages=None, users=None): # noqa: E501 """SubscriptionUsage - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._assets = None self._converters = None self._customers = None @@ -91,7 +84,6 @@ def __init__(self, assets=None, converters=None, customers=None, dashboards=None self._transport_messages = None self._users = None self.discriminator = None - if assets is not None: self.assets = assets if converters is not None: @@ -501,11 +493,8 @@ def __eq__(self, other): if not isinstance(other, SubscriptionUsage): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, SubscriptionUsage): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 be16559b..512d0903 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 @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class TenantSolutionTemplateDetails(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 @@ -56,12 +53,8 @@ class TenantSolutionTemplateDetails(object): 'title': 'title' } - def __init__(self, description=None, highlights=None, id=None, image_urls=None, install_timeout_ms=None, installed=None, level=None, tenant_attribute_keys=None, tenant_telemetry_keys=None, title=None, _configuration=None): # noqa: E501 + def __init__(self, description=None, highlights=None, id=None, image_urls=None, install_timeout_ms=None, installed=None, level=None, tenant_attribute_keys=None, tenant_telemetry_keys=None, title=None): # noqa: E501 """TenantSolutionTemplateDetails - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._description = None self._highlights = None self._id = None @@ -73,7 +66,6 @@ def __init__(self, description=None, highlights=None, id=None, image_urls=None, self._tenant_telemetry_keys = None self._title = None self.discriminator = None - if description is not None: self.description = description if highlights is not None: @@ -240,8 +232,7 @@ def level(self, level): :type: str """ allowed_values = ["MAKER", "PROTOTYPE", "STARTUP"] # noqa: E501 - if (self._configuration.client_side_validation and - level not in allowed_values): + if level not in allowed_values: raise ValueError( "Invalid value for `level` ({0}), must be one of {1}" # noqa: E501 .format(level, allowed_values) @@ -352,11 +343,8 @@ def __eq__(self, other): if not isinstance(other, TenantSolutionTemplateDetails): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, TenantSolutionTemplateDetails): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 59eca4f7..e623d7f9 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 @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class TenantSolutionTemplateInfo(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 @@ -54,12 +51,8 @@ class TenantSolutionTemplateInfo(object): 'title': 'title' } - def __init__(self, id=None, install_timeout_ms=None, installed=None, level=None, preview_image_url=None, short_description=None, tenant_attribute_keys=None, tenant_telemetry_keys=None, title=None, _configuration=None): # noqa: E501 + def __init__(self, id=None, install_timeout_ms=None, installed=None, level=None, preview_image_url=None, short_description=None, tenant_attribute_keys=None, tenant_telemetry_keys=None, title=None): # noqa: E501 """TenantSolutionTemplateInfo - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._id = None self._install_timeout_ms = None self._installed = None @@ -70,7 +63,6 @@ def __init__(self, id=None, install_timeout_ms=None, installed=None, level=None, self._tenant_telemetry_keys = None self._title = None self.discriminator = None - if id is not None: self.id = id if install_timeout_ms is not None: @@ -172,8 +164,7 @@ def level(self, level): :type: str """ allowed_values = ["MAKER", "PROTOTYPE", "STARTUP"] # noqa: E501 - if (self._configuration.client_side_validation and - level not in allowed_values): + if level not in allowed_values: raise ValueError( "Invalid value for `level` ({0}), must be one of {1}" # noqa: E501 .format(level, allowed_values) @@ -326,11 +317,8 @@ def __eq__(self, other): if not isinstance(other, TenantSolutionTemplateInfo): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, TenantSolutionTemplateInfo): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + return not self == other 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 fa236efc..317b5d0b 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 @@ -10,19 +10,16 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git """ - import pprint import re # noqa: F401 import six - class TenantSolutionTemplateInstructions(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 @@ -42,17 +39,12 @@ class TenantSolutionTemplateInstructions(object): 'details': 'details' } - def __init__(self, dashboard_group_id=None, dashboard_id=None, details=None, _configuration=None): # noqa: E501 + def __init__(self, dashboard_group_id=None, dashboard_id=None, details=None): # noqa: E501 """TenantSolutionTemplateInstructions - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - self._dashboard_group_id = None self._dashboard_id = 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: @@ -163,11 +155,8 @@ def __eq__(self, other): if not isinstance(other, TenantSolutionTemplateInstructions): return False - return self.to_dict() == other.to_dict() + return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, TenantSolutionTemplateInstructions): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file + 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 b87b98e8..f9164a99 100644 --- a/tb_rest_client/models/models_pe/user.py +++ b/tb_rest_client/models/models_pe/user.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 User(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 @@ -61,7 +57,6 @@ class User(object): def __init__(self, additional_info=None, authority=None, created_time=None, customer_id=None, email=None, first_name=None, id=None, last_name=None, name=None, owner_id=None, tenant_id=None): # noqa: E501 """User - a model defined in Swagger""" # noqa: E501 - self._additional_info = None self._authority = None self._created_time = None @@ -74,7 +69,6 @@ def __init__(self, additional_info=None, authority=None, created_time=None, cust self._owner_id = None self._tenant_id = None self.discriminator = None - if additional_info is not None: self.additional_info = additional_info if authority is not None: diff --git a/tb_rest_client/models/models_pe/user_id.py b/tb_rest_client/models/models_pe/user_id.py new file mode 100644 index 00000000..6101e7f1 --- /dev/null +++ b/tb_rest_client/models/models_pe/user_id.py @@ -0,0 +1,111 @@ +# 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 UserId(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 + """UserId - 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 UserId. # noqa: E501 + + + :return: The id of this UserId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserId. + + + :param id: The id of this UserId. # 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(UserId, 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, UserId): + 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 1633dd5f..335186a1 100644 --- a/tb_rest_client/models/models_pe/white_labeling_params.py +++ b/tb_rest_client/models/models_pe/white_labeling_params.py @@ -1,29 +1,25 @@ # coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# + +""" + 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 WhiteLabelingParams(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ + """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 @@ -67,7 +63,6 @@ class WhiteLabelingParams(object): def __init__(self, app_title=None, custom_css=None, enable_help_links=None, favicon=None, favicon_checksum=None, help_link_base_url=None, logo_image_checksum=None, logo_image_height=None, logo_image_url=None, palette_settings=None, platform_name=None, platform_version=None, show_name_version=None, white_labeling_enabled=None): # noqa: E501 """WhiteLabelingParams - a model defined in Swagger""" # noqa: E501 - self._app_title = None self._custom_css = None self._enable_help_links = None @@ -83,7 +78,6 @@ def __init__(self, app_title=None, custom_css=None, enable_help_links=None, favi self._show_name_version = None self._white_labeling_enabled = None self.discriminator = None - if app_title is not None: self.app_title = app_title if custom_css is not None: diff --git a/tb_rest_client/rest_client_base.py b/tb_rest_client/rest_client_base.py index c8528eba..97943cdb 100644 --- a/tb_rest_client/rest_client_base.py +++ b/tb_rest_client/rest_client_base.py @@ -23,6 +23,7 @@ from tb_rest_client.api.api_ce import * from tb_rest_client.models.models_ce import * +from tb_rest_client.models.models_pe import * from tb_rest_client.configuration import Configuration from tb_rest_client.api_client import ApiClient @@ -93,899 +94,849 @@ def login(self, username, password): def get_token(self): return self.token_info["token"] - """Admin controller endpoints (for ce and pe)""" + def delete_client_registration_template(self, client_registration_template_id: EntityId): + client_registration_template_id = self.get_id(client_registration_template_id) + return self.o_auth_2_config_template_controller.delete_client_registration_template_using_delete(client_registration_template_id=client_registration_template_id) - def get_security_settings(self): - return self.admin_controller.get_security_settings_using_get() + def get_client_registration_templates(self, ): + return self.o_auth_2_config_template_controller.get_client_registration_templates_using_get() - def save_security_settings(self, security_settings: SecuritySettings): - return self.admin_controller.save_security_settings_using_post(security_settings) + def save_client_registration_template(self, body: OAuth2ClientRegistrationTemplate): + return self.o_auth_2_config_template_controller.save_client_registration_template_using_post(body=body) - def save_admin_settings(self, admin_settings: AdminSettings): - return self.admin_controller.save_admin_settings_using_post(admin_settings) + def get_asset_types(self, ): + return self.asset_controller.get_asset_types_using_get() - def send_test_mail(self, admin_settings: AdminSettings): - return self.admin_controller.send_test_mail_using_post(admin_settings) + def delete_asset(self, asset_id: AssetId): + asset_id = self.get_id(asset_id) + return self.asset_controller.delete_asset_using_delete(asset_id=asset_id) - def get_admin_settings(self, key, system_by_default=False): - return self.admin_controller.get_admin_settings_using_get(key=key, system_by_default=system_by_default) + def get_customer_assets(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + 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 check_updates(self): - return self.admin_controller.check_updates_using_get() + def get_tenant_asset(self, asset_name: str): + return self.asset_controller.get_tenant_asset_using_get(asset_name=asset_name) - """Alarm controller endpoints""" + def find_by_query(self, body: AssetSearchQuery): + return self.asset_controller.find_by_query_using_post(body=body) - def get_alarm_by_id(self, alarm_id: AlarmId): + def get_tenant_assets(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + 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_assets_by_ids(self, asset_ids: list): + return self.asset_controller.get_assets_by_ids_using_get(asset_ids=asset_ids) + + def get_asset_by_id(self, asset_id: AssetId): + asset_id = self.get_id(asset_id) + return self.asset_controller.get_asset_by_id_using_get(asset_id=asset_id) + + def assign_rule_chain_to_edge(self, edge_id: EdgeId, rule_chain_id: RuleChainId): + edge_id = self.get_id(edge_id) + rule_chain_id = self.get_id(rule_chain_id) + return self.rule_chain_controller.assign_rule_chain_to_edge_using_post(edge_id=edge_id, rule_chain_id=rule_chain_id) + + def delete_rule_chain(self, rule_chain_id: RuleChainId): + 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 export_rule_chains(self, limit: str): + return self.rule_chain_controller.export_rule_chains_using_get(limit=limit) + + def get_auto_assign_to_edge_rule_chains(self, ): + return self.rule_chain_controller.get_auto_assign_to_edge_rule_chains_using_get() + + def get_edge_rule_chains(self, edge_id: EdgeId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + edge_id = self.get_id(edge_id) + return self.rule_chain_controller.get_edge_rule_chains_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 get_latest_rule_node_debug_input(self, rule_node_id: RuleNodeId): + rule_node_id = self.get_id(rule_node_id) + return self.rule_chain_controller.get_latest_rule_node_debug_input_using_get(rule_node_id=rule_node_id) + + def get_rule_chain_by_id(self, rule_chain_id: RuleChainId): + rule_chain_id = self.get_id(rule_chain_id) + return self.rule_chain_controller.get_rule_chain_by_id_using_get(rule_chain_id=rule_chain_id) + + def get_rule_chain_meta_data(self, rule_chain_id: RuleChainId): + rule_chain_id = self.get_id(rule_chain_id) + return self.rule_chain_controller.get_rule_chain_meta_data_using_get(rule_chain_id=rule_chain_id) + + def get_rule_chains(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.rule_chain_controller.get_rule_chains_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def import_rule_chains(self, body: RuleChainData, overwrite=None): + return self.rule_chain_controller.import_rule_chains_using_post(body=body, overwrite=overwrite) + + def save_rule_chain_meta_data(self, body: RuleChainMetaData): + return self.rule_chain_controller.save_rule_chain_meta_data_using_post(body=body) + + def save_rule_chain(self, body: DefaultRuleChainCreateRequest): + return self.rule_chain_controller.save_rule_chain_using_post(body=body) + + def save_rule_chain_v1(self, body: RuleChain): + return self.rule_chain_controller.save_rule_chain_using_post1(body=body) + + def set_auto_assign_to_edge_rule_chain(self, rule_chain_id: RuleChainId): + rule_chain_id = self.get_id(rule_chain_id) + return self.rule_chain_controller.set_auto_assign_to_edge_rule_chain_using_post(rule_chain_id=rule_chain_id) + + def set_edge_template_root_rule_chain(self, rule_chain_id: RuleChainId): + 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) + + def set_root_rule_chain_v1(self, rule_chain_id: RuleChainId): + rule_chain_id = self.get_id(rule_chain_id) + return self.rule_chain_controller.set_root_rule_chain_using_post1(rule_chain_id=rule_chain_id) + + def test_script(self, body: str): + return self.rule_chain_controller.test_script_using_post(body=body) + + def unassign_rule_chain_from_edge(self, edge_id: EdgeId, rule_chain_id: RuleChainId): + edge_id = self.get_id(edge_id) + rule_chain_id = self.get_id(rule_chain_id) + return self.rule_chain_controller.unassign_rule_chain_from_edge_using_delete(edge_id=edge_id, rule_chain_id=rule_chain_id) + + def unset_auto_assign_to_edge_rule_chain(self, rule_chain_id: RuleChainId): + rule_chain_id = self.get_id(rule_chain_id) + return self.rule_chain_controller.unset_auto_assign_to_edge_rule_chain_using_delete(rule_chain_id=rule_chain_id) + + def activate_user(self, body: str, send_activation_mail=None): + return self.auth_controller.activate_user_using_post(body=body, send_activation_mail=send_activation_mail) + + def change_password(self, body: str): + return self.auth_controller.change_password_using_post(body=body) + + def check_activate_token(self, activate_token: str): + return self.auth_controller.check_activate_token_using_get(activate_token=activate_token) + + def check_reset_token(self, reset_token: str): + return self.auth_controller.check_reset_token_using_get(reset_token=reset_token) + + def get_user_password_policy(self, ): + return self.auth_controller.get_user_password_policy_using_get() + + def get_user(self, ): + return self.auth_controller.get_user_using_get() + + def logout(self, ): + return self.auth_controller.logout_using_post() + + def request_reset_password_by_email(self, body: str): + return self.auth_controller.request_reset_password_by_email_using_post(body=body) + + def reset_password(self, body: str): + return self.auth_controller.reset_password_using_post(body=body) + + def get_events_get(self, entity_type: str, entity_id: EntityId, event_type: str, tenant_id: TenantId, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None): + 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, event_type=event_type, 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) + + def get_events_v1_get1(self, entity_type: str, entity_id: EntityId, tenant_id: TenantId, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None): + entity_id = self.get_id(entity_id) + tenant_id = self.get_id(tenant_id) + return self.event_controller.get_events_using_get1(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) + + def get_events_post(self, body: EventFilter, tenant_id: TenantId, page_size: int, page: int, entity_type: str, entity_id: EntityId, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None): + tenant_id = self.get_id(tenant_id) + entity_id = self.get_id(entity_id) + return self.event_controller.get_events_using_post(body=body, tenant_id=tenant_id, page_size=page_size, page=page, entity_type=entity_type, entity_id=entity_id, text_search=text_search, sort_property=sort_property, sort_order=sort_order, start_time=start_time, end_time=end_time) + + def delete_entity_attributes(self, device_id: DeviceId, scope: str, keys: str): + device_id = self.get_id(device_id) + return self.telemetry_controller.delete_entity_attributes_using_delete(device_id=device_id, scope=scope, keys=keys) + + def delete_entity_attributes_v1(self, entity_type: str, entity_id: EntityId, scope: str, keys: str): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.delete_entity_attributes_using_delete1(entity_type=entity_type, entity_id=entity_id, scope=scope, keys=keys) + + def delete_entity_timeseries(self, entity_type: str, entity_id: EntityId, keys: str, delete_all_data_for_keys=None, start_ts=None, end_ts=None, rewrite_latest_if_deleted=None): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.delete_entity_timeseries_using_delete(entity_type=entity_type, entity_id=entity_id, keys=keys, delete_all_data_for_keys=delete_all_data_for_keys, start_ts=start_ts, end_ts=end_ts, rewrite_latest_if_deleted=rewrite_latest_if_deleted) + + def get_attribute_keys_by_scope(self, entity_type: str, entity_id: EntityId, scope: str): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.get_attribute_keys_by_scope_using_get(entity_type=entity_type, entity_id=entity_id, scope=scope) + + def get_attribute_keys(self, entity_type: str, entity_id: EntityId): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.get_attribute_keys_using_get(entity_type=entity_type, entity_id=entity_id) + + def get_attributes_by_scope(self, entity_type: str, entity_id: EntityId, scope: str, keys=None): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.get_attributes_by_scope_using_get(entity_type=entity_type, entity_id=entity_id, scope=scope, keys=keys) + + def get_attributes(self, entity_type: str, entity_id: EntityId, keys=None): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.get_attributes_using_get(entity_type=entity_type, entity_id=entity_id, keys=keys) + + def get_latest_timeseries(self, entity_type: str, entity_id: EntityId, keys=None, use_strict_data_types=None): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.get_latest_timeseries_using_get(entity_type=entity_type, entity_id=entity_id, keys=keys, use_strict_data_types=use_strict_data_types) + + def get_timeseries_keys_v1(self, entity_type: str, entity_id: EntityId): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.get_timeseries_keys_using_get1(entity_type=entity_type, entity_id=entity_id) + + def get_timeseries(self, entity_type: str, entity_id: EntityId, keys: str, start_ts: str, end_ts: str, interval=None, limit=None, agg=None, order_by=None, use_strict_data_types=None): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.get_timeseries_using_get(entity_type=entity_type, entity_id=entity_id, keys=keys, start_ts=start_ts, end_ts=end_ts, interval=interval, limit=limit, agg=agg, order_by=order_by, use_strict_data_types=use_strict_data_types) + + def save_device_attributes(self, body: str, device_id: DeviceId, scope: str): + device_id = self.get_id(device_id) + return self.telemetry_controller.save_device_attributes_using_post(body=body, device_id=device_id, scope=scope) + + def save_entity_attributes_v1(self, body: str, entity_type: str, entity_id: EntityId, scope: str): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.save_entity_attributes_v1_using_post(body=body, entity_type=entity_type, entity_id=entity_id, scope=scope) + + def save_entity_attributes_v2(self, body: str, entity_type: str, entity_id: EntityId, scope: str): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.save_entity_attributes_v2_using_post(body=body, entity_type=entity_type, entity_id=entity_id, scope=scope) + + def save_entity_telemetry(self, body: str, entity_type: str, entity_id: EntityId, scope: str): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.save_entity_telemetry_using_post(body=body, entity_type=entity_type, entity_id=entity_id, scope=scope) + + def save_entity_telemetry_with_ttl(self, body: str, entity_type: str, entity_id: EntityId, scope: str, ttl: int): + entity_id = self.get_id(entity_id) + return self.telemetry_controller.save_entity_telemetry_with_ttl_using_post(body=body, entity_type=entity_type, entity_id=entity_id, scope=scope, ttl=ttl) + + def ack_alarm(self, alarm_id: AlarmId): alarm_id = self.get_id(alarm_id) - return self.alarm_controller.get_alarm_by_id_using_get(alarm_id) + return self.alarm_controller.ack_alarm_using_post(alarm_id=alarm_id) - def get_alarm_info_by_id(self, alarm_id: AlarmId): + def clear_alarm(self, alarm_id: AlarmId): alarm_id = self.get_id(alarm_id) - return self.alarm_controller.get_alarm_info_by_id_using_get(alarm_id) + return self.alarm_controller.clear_alarm_using_post(alarm_id=alarm_id) def delete_alarm(self, alarm_id: AlarmId): alarm_id = self.get_id(alarm_id) - return self.alarm_controller.delete_alarm_using_delete(alarm_id) + return self.alarm_controller.delete_alarm_using_delete(alarm_id=alarm_id) - def ack_alarm(self, alarm_id: AlarmId): + def get_alarm_by_id(self, alarm_id: AlarmId): alarm_id = self.get_id(alarm_id) - return self.alarm_controller.ack_alarm_using_post(alarm_id) + return self.alarm_controller.get_alarm_by_id_using_get(alarm_id=alarm_id) - def clear_alarm(self, alarm_id: AlarmId): + def get_alarm_info_by_id(self, alarm_id: AlarmId): alarm_id = self.get_id(alarm_id) - return self.alarm_controller.clear_alarm_using_post(alarm_id) - - def get_alarms(self, entity_id: EntityId, page_size=10, page=0, search_status=None, status=None, text_search=None, - sort_property=None, sort_order=None, limit=100000, start_time=None, end_time=None, offset=None, - fetch_originator=None): - return self.alarm_controller.get_alarms_using_get(entity_type=entity_id.entity_type, - entity_id=entity_id.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, - offset=offset, - fetch_originator=fetch_originator, - limit=limit) - - def get_highest_alarm_severity(self, entity_id: EntityId, search_status, status): - return self.alarm_controller.get_highest_alarm_severity_using_get(entity_type=entity_id.entity_type, - entity_id=entity_id.id, - search_status=search_status, - status=status) - - def save_alarm(self, alarm: Alarm): - return self.alarm_controller.save_alarm_using_post(alarm) - - """Asset controller endpoints""" + return self.alarm_controller.get_alarm_info_by_id_using_get(alarm_id=alarm_id) - def get_asset_by_id(self, asset_id: AssetId): - asset_id = self.get_id(asset_id) - return self.asset_controller.get_asset_by_id_using_get(asset_id) + def get_alarms(self, entity_type: str, entity_id: EntityId, page_size: int, page: int, search_status=None, status=None, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None, fetch_originator=None): + 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 delete_asset(self, asset_id: AssetId): - asset_id = self.get_id(asset_id) - return self.asset_controller.delete_asset_using_delete(asset_id) - - def get_tenant_assets(self, page_size=10, page=0, type=None, text_search=None, sort_property=None, sort_order=None, - limit=100000): - return self.asset_controller.get_tenant_assets_using_get(page_size=str(page_size), - page=str(page), - type=type, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) - - def get_tenant_asset(self, asset_name): - return self.asset_controller.get_tenant_asset_using_get(asset_name) - - def get_customer_assets(self, customer_id: CustomerId, page_size=10, page=0, type=None, text_search=None, - sort_property=None, sort_order=None, limit=100000): - customer_id = self.get_id(customer_id) - return self.asset_controller.get_customer_assets_using_get(customer_id=customer_id, - page_size=str(page_size), - page=str(page), - type=type, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) - - def get_assets_by_ids(self, asset_ids): - return self.asset_controller.get_assets_by_ids_using_get(asset_ids) - - def find_by_query(self, query): - if isinstance(query, AssetSearchQuery): - return self.asset_controller.find_by_query_using_post(query) - elif isinstance(query, DeviceSearchQuery): - return self.device_controller.find_by_query_using_post1(query) - elif isinstance(query, EntityRelationsQuery): - return self.entity_relation_controller.find_by_query_using_post2(query) - elif isinstance(query, EntityViewSearchQuery): - return self.entity_view_controller.find_by_query_using_post3(query) - - def get_asset_types(self): - return self.asset_controller.get_asset_types_using_get() + def get_all_alarms(self, page_size: int, page: int, search_status=None, status=None, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None, fetch_originator=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 get_highest_alarm_severity(self, entity_type: str, entity_id: EntityId, search_status=None, status=None): + 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 save_alarm(self, body: Alarm): + return self.alarm_controller.save_alarm_using_post(body=body) - """Audit Log endpoints""" + def sync_edge(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.sync_edge_using_post(edge_id=edge_id) - def get_audit_logs_by_customer_id(self, customer_id: CustomerId, page_size=10, page=0, text_search=None, - sort_property=None, sort_order=None, limit=100000, start_time=None, end_time=None, - action_types=None): + def get_customer_edges(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): customer_id = self.get_id(customer_id) - return self.audit_log_controller.get_audit_logs_by_customer_id_using_get(customer_id=customer_id, - page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, - limit=str(limit), - start_time=start_time, - end_time=end_time, - action_types=action_types) - - def get_audit_logs_by_user_id(self, user_id: UserId, page_size=10, page=0, text_search=None, sort_property=None, - sort_order=None, limit=100000, start_time=None, end_time=None, action_types=None): - user_id = self.get_id(user_id) - return self.audit_log_controller.get_audit_logs_by_user_id_using_get(user_id=user_id, - page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit), - start_time=start_time, - end_time=end_time, - action_types=action_types) - - def get_audit_logs_by_entity_id(self, entity_id: EntityId, page_size=10, page=0, text_search=None, - sort_property=None, sort_order=None, limit=100000, start_time=None, end_time=None, - action_types=None): - return self.audit_log_controller.get_audit_logs_by_entity_id_using_get(entity_type=entity_id.entity_type, - entity_id=entity_id.id, - page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit), - start_time=start_time, - end_time=end_time, - action_types=action_types) - - def get_audit_logs(self, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None, limit=100000, - start_time=None, end_time=None, action_types=None): - return self.audit_log_controller.get_audit_logs_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit), - start_time=start_time, - end_time=end_time, - action_types=action_types) - - def get_activation_token(self, user_id: UserId): - user_id = self.get_id(user_id) - return self.user_controller.get_activation_token_using_get(user_id) + return self.edge_controller.get_customer_edges_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_user(self): - return self.auth_controller.get_user_using_get() + def get_edge_types(self, ): + return self.edge_controller.get_edge_types_using_get() - def logout(self): - self.auth_controller.logout_using_post() + def get_tenant_edge(self, edge_name: str): + return self.edge_controller.get_tenant_edge_using_get(edge_name=edge_name) - def change_password(self, current_password, new_password): - change_password_request = '{"currentPassword": "%s","newPassword": "%s"}' % (current_password, new_password) - self.auth_controller.change_password_using_post(change_password_request) + def check_instance(self, body: object): + return self.edge_controller.check_instance_using_post(body=body) - def get_user_password_policy(self): - return self.auth_controller.get_user_password_policy_using_get() + def find_by_query_v2(self, body: EdgeSearchQuery): + return self.edge_controller.find_by_query_using_post2(body=body) - def check_activation_token(self, user_id: UserId): - activation_token = self.get_activation_token(user_id) - return self.auth_controller.check_activate_token_using_get(activation_token) + def delete_edge(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.delete_edge_using_delete(edge_id=edge_id) - def request_reset_password_by_email(self, email: str): - self.auth_controller.request_reset_password_by_email_using_post('{"email":"%s"}' % email) + def get_edges(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.edge_controller.get_edges_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def activate_user(self, user_id: UserId, password): - user_id = self.get_id(user_id) - activation_request = {"activateToken": self.get_activation_token(user_id).replace("'", '"'), - "password": password} - return self.auth_controller.activate_user_using_post(activation_request) + def is_edges_support_enabled(self, ): + return self.edge_controller.is_edges_support_enabled_using_get() + + def get_edges_by_ids(self, edge_ids: list): + return self.edge_controller.get_edges_by_ids_using_get(edge_ids=edge_ids) + + def find_missing_to_related_rule_chains(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.find_missing_to_related_rule_chains_using_get(edge_id=edge_id) + + def set_root_rule_chain(self, edge_id: EdgeId, rule_chain_id: RuleChainId): + edge_id = self.get_id(edge_id) + rule_chain_id = self.get_id(rule_chain_id) + return self.edge_controller.set_root_rule_chain_using_post(edge_id=edge_id, rule_chain_id=rule_chain_id) - """Component descriptors endpoints""" + def get_edge_by_id(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.get_edge_by_id_using_get(edge_id=edge_id) - def get_component(self, component_descriptor_class_name): - return self.component_descriptor_controller.get_component_descriptor_by_clazz_using_get( - component_descriptor_class_name) + def get_tenant_edges(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.edge_controller.get_tenant_edges_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_component_descriptors_by_type(self, component_type, rule_chain_type=None): - return self.component_descriptor_controller.get_component_descriptors_by_type_using_get(component_type, - rule_chain_type=rule_chain_type) + def activate_instance(self, license_secret: str, release_date: str): + return self.edge_controller.activate_instance_using_post(license_secret=license_secret, release_date=release_date) - def get_component_descriptors_by_types(self, component_types, rule_chain_type=None): - return self.component_descriptor_controller.get_component_descriptors_by_types_using_get(component_types, - rule_chain_type=rule_chain_type) + def get_persisted_rpc(self, rpc_id: RpcId): + rpc_id = self.get_id(rpc_id) + return self.rpc_v_2_controller.get_persisted_rpc_using_get(rpc_id=rpc_id) - """Customers endpoints""" + def handle_two_way_device_rpc_request_v1(self, body: str, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.rpc_v_2_controller.handle_two_way_device_rpc_request_using_post1(body=body, device_id=device_id) + + def delete_resource(self, rpc_id: RpcId): + rpc_id = self.get_id(rpc_id) + return self.rpc_v_2_controller.delete_resource_using_delete(rpc_id=rpc_id) + + def handle_one_way_device_rpc_request_v1(self, body: str, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.rpc_v_2_controller.handle_one_way_device_rpc_request_using_post1(body=body, device_id=device_id) + + def get_persisted_rpc_by_device(self, device_id: DeviceId, page_size: int, page: int, rpc_status: str, text_search=None, sort_property=None, sort_order=None): + device_id = self.get_id(device_id) + return self.rpc_v_2_controller.get_persisted_rpc_by_device_using_get(device_id=device_id, page_size=page_size, page=page, rpc_status=rpc_status, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def delete_customer(self, customer_id: CustomerId): + customer_id = self.get_id(customer_id) + return self.customer_controller.delete_customer_using_delete(customer_id=customer_id) def get_customer_by_id(self, customer_id: CustomerId): customer_id = self.get_id(customer_id) - return self.customer_controller.get_customer_by_id_using_get(customer_id) + return self.customer_controller.get_customer_by_id_using_get(customer_id=customer_id) def get_short_customer_info_by_id(self, customer_id: CustomerId): customer_id = self.get_id(customer_id) - return self.customer_controller.get_short_customer_info_by_id_using_get(customer_id) + return self.customer_controller.get_short_customer_info_by_id_using_get(customer_id=customer_id) - def get_customer_title_by_id(self, customer_id: CustomerId): - customer_id = self.get_id(customer_id) - return self.customer_controller.get_customer_title_by_id_using_get(customer_id) + def get_customers(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.customer_controller.get_customers_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def delete_customer(self, customer_id: CustomerId): + def get_customer_title_by_id(self, customer_id: CustomerId): customer_id = self.get_id(customer_id) - self.customer_controller.delete_customer_using_delete(customer_id=customer_id) + return self.customer_controller.get_customer_title_by_id_using_get(customer_id=customer_id) - def get_customers(self, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None, limit=100000): - return self.customer_controller.get_customers_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) + def get_tenant_customer(self, customer_title: str): + return self.customer_controller.get_tenant_customer_using_get(customer_title=customer_title) - def get_tenant_customer(self, customer_title): - return self.customer_controller.get_tenant_customer_using_get(customer_title) + def send_activation_email(self, email: str): + return self.user_controller.send_activation_email_using_post(email=email) - """Dashboards endpoints""" + def get_user_by_id(self, user_id: UserId): + user_id = self.get_id(user_id) + return self.user_controller.get_user_by_id_using_get(user_id=user_id) - def get_home_dashboard(self): - return self.dashboard_controller.get_home_dashboard_using_get() + def set_user_credentials_enabled(self, user_id: UserId, user_credentials_enabled=None): + user_id = self.get_id(user_id) + return self.user_controller.set_user_credentials_enabled_using_post(user_id=user_id, user_credentials_enabled=user_credentials_enabled) - def get_server_time(self): - return self.dashboard_controller.get_server_time_using_get() + def get_tenant_admins(self, tenant_id: TenantId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + tenant_id = self.get_id(tenant_id) + return self.user_controller.get_tenant_admins_using_get(tenant_id=tenant_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_max_datapoints_limit(self): - return self.dashboard_controller.get_max_datapoints_limit_using_get() + def get_customer_users(self, customer_id: CustomerId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + customer_id = self.get_id(customer_id) + return self.user_controller.get_customer_users_using_get(customer_id=customer_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_dashboard_info_by_id(self, dashboard_id: DashboardId): - dashboard_id = self.get_id(dashboard_id) - return self.dashboard_controller.get_dashboard_info_by_id_using_get(dashboard_id) + def get_user_token(self, user_id: UserId): + user_id = self.get_id(user_id) + return self.user_controller.get_user_token_using_get(user_id=user_id) - def get_dashboard_by_id(self, dashboard_id: DashboardId): - dashboard_id = self.get_id(dashboard_id) - return self.dashboard_controller.get_dashboard_by_id_using_get(dashboard_id) + def get_activation_link(self, user_id: UserId): + user_id = self.get_id(user_id) + return self.user_controller.get_activation_link_using_get(user_id=user_id) - def delete_dashboard(self, dashboard_id: DashboardId): - dashboard_id = self.get_id(dashboard_id) - self.dashboard_controller.delete_dashboard_using_delete(dashboard_id) + def delete_user(self, user_id: UserId): + user_id = self.get_id(user_id) + return self.user_controller.delete_user_using_delete(user_id=user_id) - def get_tenant_home_dashboard_info(self): - return self.dashboard_controller.get_tenant_home_dashboard_info_using_get() + def is_user_token_access_enabled(self, ): + return self.user_controller.is_user_token_access_enabled_using_get() - def set_tenant_home_dashboard_info(self, home_dashboard_info): - return self.dashboard_controller.set_tenant_home_dashboard_info_using_post( - home_dashboard_info=home_dashboard_info) - - def get_tenant_dashboards(self, tenant_id=None, page_size=10, page=0, text_search=None, sort_property=None, - sort_order=None, limit=100000): - if tenant_id is not None: - tenant_id = self.get_id(tenant_id) - return self.dashboard_controller.get_tenant_dashboards_using_get1(tenant_id=tenant_id, - page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) - else: - return self.dashboard_controller.get_tenant_dashboards_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) + def get_tenant_queues_by_service_type(self, service_type: str): + return self.queue_controller.get_tenant_queues_by_service_type_using_get(service_type=service_type) - """Device endpoints""" + def handle_one_way_device_rpc_request(self, body: str, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.rpc_v_1_controller.handle_one_way_device_rpc_request_using_post(body=body, device_id=device_id) - def get_device_by_id(self, device_id: DeviceId): + def handle_two_way_device_rpc_request(self, body: str, device_id: DeviceId): device_id = self.get_id(device_id) - return self.device_controller.get_device_by_id_using_get(device_id) + return self.rpc_v_1_controller.handle_two_way_device_rpc_request_using_post(body=body, device_id=device_id) + + def get_tenant_devices(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.device_controller.get_tenant_devices_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def save_device(self, device: Device): - return self.device_controller.save_device_using_post(device) + def get_tenant_device(self, device_name: str): + return self.device_controller.get_tenant_device_using_get(device_name=device_name) def delete_device(self, device_id: DeviceId): device_id = self.get_id(device_id) - return self.device_controller.delete_device_using_delete(device_id) + return self.device_controller.delete_device_using_delete(device_id=device_id) - def get_device_credentials_by_device_id(self, device_id: DeviceId): - device_id = self.get_id(device_id) - return self.device_controller.get_device_credentials_by_device_id_using_get(device_id) + def re_claim_device(self, device_name: str): + return self.device_controller.re_claim_device_using_delete(device_name=device_name) - def save_device_credentials(self, device_credentials: DeviceCredentials): - return self.device_controller.save_device_credentials_using_post(device_credentials) + def count_by_device_profile_and_empty_ota_package(self, ota_package_type: str, device_profile_id: DeviceProfileId): + device_profile_id = self.get_id(device_profile_id) + return self.device_controller.count_by_device_profile_and_empty_ota_package_using_get(ota_package_type=ota_package_type, device_profile_id=device_profile_id) - def get_tenant_devices(self, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None, - limit=100000): - return self.device_controller.get_tenant_devices_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) + def get_device_credentials_by_device_id(self, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.device_controller.get_device_credentials_by_device_id_using_get(device_id=device_id) - def get_tenant_device(self, device_name): - return self.device_controller.get_tenant_device_using_get(device_name) + def find_by_query_v1(self, body: DeviceSearchQuery): + return self.device_controller.find_by_query_using_post1(body=body) def assign_device_to_tenant(self, tenant_id: TenantId, device_id: DeviceId): + tenant_id = self.get_id(tenant_id) + device_id = self.get_id(device_id) return self.device_controller.assign_device_to_tenant_using_post(tenant_id=tenant_id, device_id=device_id) - def get_customer_devices(self, customer_id: CustomerId, page_size=None, page=None, type=None, text_search=None, - sort_property=None, sort_order=None, limit=100000): - customer_id = self.get_id(customer_id) - return self.device_controller.get_customer_devices_using_get(customer_id=customer_id, - page_size=str(page_size), - page=str(page), - type=type, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) - - def get_devices_by_ids(self, device_ids): - self.device_controller.get_devices_by_ids_using_get(device_ids) - - def get_device_types(self): + def get_device_types(self, ): return self.device_controller.get_device_types_using_get() - def claim_device(self, device_name, secret_key, sub_customer_id=None): - sub_customer_id = self.get_id(sub_customer_id) - try: - return self.device_controller.claim_device_using_post(device_name, - claim_request='{"secret_key": "%s"}' % (secret_key,), - sub_customer_id=sub_customer_id) - except AttributeError: - return self.device_controller.claim_device_using_post1(device_name=device_name, - claim_request='{"secret_key": "%s"}' % (secret_key,)) - - def reclaim_device(self, device_name): - self.device_controller.re_claim_device_using_delete(device_name) - - """Relation endpoints""" - - def save_relation(self, relation: EntityRelation): - return self.entity_relation_controller.save_relation_using_post(relation) - - def delete_relation(self, from_id, relation_type, to_id, relation_type_group): - self.entity_relation_controller.delete_relation_using_delete(from_id=from_id.id, - from_type=from_id.entity_type, - relation_type=relation_type, - to_id=to_id.id, - to_type=to_id.entity_type, - relation_type_group=relation_type_group) - - def delete_relations(self, entity_id: EntityId, id, type): - self.entity_relation_controller.delete_relations_using_delete(entity_type=entity_id.entity_type, - entity_id=entity_id.id, id=id, type=type) - - def get_relation(self, from_id, relation_type, to_id, relation_type_group): - return self.entity_relation_controller.get_relation_using_get(from_id=from_id.id, - from_type=from_id.entity_type, - relation_type=relation_type, - to_id=to_id.id, - to_type=to_id.entity_type, - relation_type_group=relation_type_group) - - def find_by_from(self, from_id, relation_type_group, relation_type=None): - if relation_type is not None: - return self.entity_relation_controller.find_by_from_using_get(from_id=from_id.id, - from_type=from_id.entity_type, - relation_type=relation_type, - relation_type_group=relation_type_group) - else: - return self.entity_relation_controller.find_by_from_using_get1(from_id=from_id.id, - from_type=from_id.entity_type, - relation_type_group=relation_type_group) - - def find_info_by_from(self, from_id, relation_type_group): - return self.entity_relation_controller.find_info_by_from_using_get(from_id=from_id.id, - from_type=from_id.entity_type, - relation_type_group=relation_type_group) - - def find_by_to(self, to_id, relation_type_group, relation_type=None): - if relation_type is not None: - return self.entity_relation_controller.find_by_to_using_get(to_id=to_id.id, - to_type=to_id.entity_type, - relation_type=relation_type, - relation_type_group=relation_type_group) - else: - return self.entity_relation_controller.find_by_to_using_get1(to_id=to_id.id, - to_type=to_id.entity_type, - relation_type_group=relation_type_group) + def get_device_by_id(self, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.device_controller.get_device_by_id_using_get(device_id=device_id) - def find_info_by_to(self, to_id, relation_type_group): - return self.entity_relation_controller.find_info_by_to_using_get(to_id=to_id.id, - to_type=to_id.entity_type, - relation_type_group=relation_type_group) + def get_devices_by_ids(self, device_ids: list): + return self.device_controller.get_devices_by_ids_using_get(device_ids=device_ids) - def find_info_by_query(self, query): - return self.entity_relation_controller.find_info_by_query_using_post(query=query) + def get_customer_devices(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + customer_id = self.get_id(customer_id) + return self.device_controller.get_customer_devices_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) - """Entity view endpoints""" + def save_device_credentials(self, body: DeviceCredentials): + return self.device_controller.save_device_credentials_using_post(body=body) - def get_entity_view_by_id(self, entity_view_id: EntityViewId): - entity_view_id = self.get_id(entity_view_id) - return self.entity_view_controller.get_entity_view_by_id_using_get(entity_view_id=entity_view_id) + def delete_relation(self, from_id: EntityId, from_type: str, relation_type: str, to_id: EntityId, to_type: str, relation_type_group=None): + from_id = self.get_id(from_id) + to_id = self.get_id(to_id) + return self.entity_relation_controller.delete_relation_using_delete(from_id=from_id, from_type=from_type, relation_type=relation_type, to_id=to_id, to_type=to_type, relation_type_group=relation_type_group) + + def delete_relations(self, entity_id: EntityId, entity_type: str, id: str, type: str): + entity_id = self.get_id(entity_id) + return self.entity_relation_controller.delete_relations_using_delete(entity_id=entity_id, entity_type=entity_type, id=id, type=type) + + def find_by_from(self, from_id: EntityId, from_type: str, relation_type: str, relation_type_group=None): + from_id = self.get_id(from_id) + return self.entity_relation_controller.find_by_from_using_get(from_id=from_id, from_type=from_type, relation_type=relation_type, relation_type_group=relation_type_group) + + def find_by_from_v1(self, from_id: EntityId, from_type: str, relation_type_group=None): + from_id = self.get_id(from_id) + return self.entity_relation_controller.find_by_from_using_get1(from_id=from_id, from_type=from_type, relation_type_group=relation_type_group) + + def find_by_query_v3(self, body: EntityRelationsQuery): + return self.entity_relation_controller.find_by_query_using_post3(body=body) + + def find_by_to(self, to_id: EntityId, to_type: str, relation_type: str, relation_type_group=None): + to_id = self.get_id(to_id) + return self.entity_relation_controller.find_by_to_using_get(to_id=to_id, to_type=to_type, relation_type=relation_type, relation_type_group=relation_type_group) + + def find_by_to_v1(self, to_id: EntityId, to_type: str, relation_type_group=None): + to_id = self.get_id(to_id) + return self.entity_relation_controller.find_by_to_using_get1(to_id=to_id, to_type=to_type, relation_type_group=relation_type_group) + + def find_info_by_from(self, from_id: EntityId, from_type: str, relation_type_group=None): + from_id = self.get_id(from_id) + return self.entity_relation_controller.find_info_by_from_using_get(from_id=from_id, from_type=from_type, relation_type_group=relation_type_group) + + def find_info_by_query(self, body: EntityRelationsQuery): + return self.entity_relation_controller.find_info_by_query_using_post(body=body) + + def find_info_by_to(self, to_id: EntityId, to_type: str, relation_type_group=None): + to_id = self.get_id(to_id) + return self.entity_relation_controller.find_info_by_to_using_get(to_id=to_id, to_type=to_type, relation_type_group=relation_type_group) + + def get_relation(self, from_id: EntityId, from_type: str, relation_type: str, to_id: EntityId, to_type: str, relation_type_group=None): + from_id = self.get_id(from_id) + to_id = self.get_id(to_id) + return self.entity_relation_controller.get_relation_using_get(from_id=from_id, from_type=from_type, relation_type=relation_type, to_id=to_id, to_type=to_type, relation_type_group=relation_type_group) + + def save_relation(self, body: EntityRelation): + return self.entity_relation_controller.save_relation_using_post(body=body) def delete_entity_view(self, entity_view_id: EntityViewId): entity_view_id = self.get_id(entity_view_id) - self.entity_view_controller.delete_entity_view_using_delete(entity_view_id=entity_view_id) + return self.entity_view_controller.delete_entity_view_using_delete(entity_view_id=entity_view_id) - def get_tenant_entity_view(self, entity_view_name): + def get_tenant_entity_view(self, entity_view_name: str): return self.entity_view_controller.get_tenant_entity_view_using_get(entity_view_name=entity_view_name) - def get_customer_entity_views(self, customer_id: CustomerId, page_size=10, page=0, type=None, text_search=None, - sort_property=None, sort_order=None, limit=100000): - customer_id = self.get_id(customer_id) - return self.entity_view_controller.get_customer_entity_views_using_get(customer_id=customer_id, - page_size=str(page_size), - page=str(page), - type=type, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) - - def get_tenant_entity_views(self, page_size=10, page=0, type=None, text_search=None, sort_property=None, - sort_order=None, limit=100000): - return self.entity_view_controller.get_tenant_entity_views_using_get(page_size=str(page_size), - page=str(page), - type=type, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) - - def get_entity_view_types(self): + def get_tenant_entity_views(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.entity_view_controller.get_tenant_entity_views_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_entity_view_types(self, ): return self.entity_view_controller.get_entity_view_types_using_get() - def find_alarm_data_by_query(self, query): - return self.entity_query_controller.find_alarm_data_by_query_using_post(query=query) - - def count_entities_by_query(self, query): - return self.entity_query_controller.count_entities_by_query_using_post(query=query) - - def find_entity_data_by_query(self, query): - return self.entity_query_controller.find_entity_data_by_query_using_post(query=query) - - def find_entity_timeseries_and_attributes_keys_by_query(self, query, timeseries: bool, attributes: bool): - return self.entity_query_controller.find_entity_timeseries_and_attributes_keys_by_query_using_post(query, - timeseries=timeseries, - attributes=attributes) - - """ Events endpoints """ - - def get_events(self, entity_id: EntityId, tenant_id, event_type=None, page_size=10, page=0, text_search=None, - sort_property=None, sort_order=None, limit=100000, start_time=None, end_time=None): - if event_type is not None: - return self.event_controller.get_events_using_get(entity_type=entity_id.entity_type, - entity_id=entity_id.id, - event_type=event_type, - tenant_id=tenant_id.id, - page_size=page_size, - page=page, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=limit, - start_time=start_time, - end_time=end_time) - else: - return self.event_controller.get_events_using_get1(entity_type=entity_id.entity_type, - entity_id=entity_id.id, - tenant_id=tenant_id.id, - page_size=page_size, - page=page, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=limit, - start_time=start_time, - end_time=end_time) - - """RPC endpoints""" - - def handle_one_way_device_rpc_request(self, device_id: DeviceId, request_body): - device_id = self.get_id(device_id) - self.rpc_controller.handle_one_way_device_rpc_request_using_post(device_id=device_id.id, - request_body=request_body) + def get_customer_entity_views(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + customer_id = self.get_id(customer_id) + return self.entity_view_controller.get_customer_entity_views_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 handle_two_way_device_rpc_request(self, device_id: DeviceId, request_body): - device_id = self.get_id(device_id) - return self.rpc_controller.handle_two_way_device_rpc_request_using_post(device_id=device_id, - request_body=request_body) + def find_by_query_v4(self, body: EntityViewSearchQuery): + return self.entity_view_controller.find_by_query_using_post4(body=body) - """ Rule chain endpoints """ + def get_entity_view_by_id(self, entity_view_id: EntityViewId): + entity_view_id = self.get_id(entity_view_id) + return self.entity_view_controller.get_entity_view_by_id_using_get(entity_view_id=entity_view_id) - def get_rule_chain_by_id(self, rule_chain_id: RuleChainId): - rule_chain_id = self.get_id(rule_chain_id) - return self.rule_chain_controller.get_rule_chain_by_id_using_get(rule_chain_id=rule_chain_id) + def check_updates(self, ): + return self.admin_controller.check_updates_using_get() - def get_rule_chain_meta_data(self, rule_chain_id: RuleChainId): - rule_chain_id = self.get_id(rule_chain_id) - return self.rule_chain_controller.get_rule_chain_meta_data_using_get(rule_chain_id=rule_chain_id) + def get_security_settings(self, ): + return self.admin_controller.get_security_settings_using_get() - def save_rule_chain(self, rule_chain: RuleChain): - return self.rule_chain_controller.save_rule_chain_using_post(rule_chain=rule_chain) + def save_admin_settings(self, body: AdminSettings): + return self.admin_controller.save_admin_settings_using_post(body=body) - def set_root_rule_chain(self, rule_chain_id: RuleChainId): - 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 send_test_sms(self, body: TestSmsRequest): + return self.admin_controller.send_test_sms_using_post(body=body) - def save_rule_chain_meta_data(self, rule_chain_meta_data: RuleChainMetaData): - return self.rule_chain_controller.save_rule_chain_meta_data_using_post( - rule_chain_meta_data=rule_chain_meta_data) + def send_test_mail(self, body: AdminSettings): + return self.admin_controller.send_test_mail_using_post(body=body) - def get_rule_chains(self, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None, - limit=100000): - return self.rule_chain_controller.get_rule_chains_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) + def save_security_settings(self, body: SecuritySettings): + return self.admin_controller.save_security_settings_using_post(body=body) - def delete_rule_chain(self, rule_chain_id: RuleChainId): - rule_chain_id = self.get_id(rule_chain_id) - self.rule_chain_controller.delete_rule_chain_using_delete(rule_chain_id) + def sign_up(self, body: SignUpRequest): + return self.sign_up_controller.sign_up_using_post(body=body) - def get_latest_rule_node_debug_input(self, rule_node_id: RuleNodeId): - rule_node_id = self.get_id(rule_node_id) - return self.rule_chain_controller.get_latest_rule_node_debug_input_using_get(rule_node_id) - - def test_script(self, input_params): - if isinstance(input_params, dict): - input_params = dumps(input_params) - self.rule_chain_controller.test_script_using_post(input_params=input_params) - - def export_rule_chains(self, limit: int): - return self.rule_chain_controller.export_rule_chains_using_get(limit=str(limit)) - - """Telemetry endpoints""" - - def get_attribute_keys(self, entity_id: EntityId): - return self.telemetry_controller.get_attribute_keys_using_get(entity_type=entity_id.entity_type, - entity_id=entity_id.id) - - def get_attribute_keys_by_scope(self, entity_id: EntityId, scope): - return self.telemetry_controller.get_attribute_keys_by_scope_using_get(entity_type=entity_id.entity_type, - entity_id=entity_id.id, scope=scope) - - def get_attributes_by_scope(self, entity_id: EntityId, scope, keys=None): - return self.telemetry_controller.get_attributes_by_scope_using_get(entity_id=entity_id.id, - entity_type=entity_id.entity_type, - scope=scope, keys=keys) - - def get_timeseries_keys(self, entity_id: EntityId): - return self.telemetry_controller.get_timeseries_keys_using_get(entity_type=entity_id.entity_type, - entity_id=entity_id.id) - - def get_latest_timeseries(self, entity_id: EntityId, keys=None): - if isinstance(keys, list): - keys = ",".join(keys) - return self.telemetry_controller.get_latest_timeseries_using_get(entity_type=entity_id.entity_type, - entity_id=entity_id.id, keys=keys) - - def get_timeseries(self, entity_id: EntityId, keys, interval=0, aggregation="NONE", use_strict_data_types=None, - start_ts=None, end_ts=None, limit=100): - if use_strict_data_types is not None: - return self.telemetry_controller.get_timeseries_using_get(entity_type=entity_id.entity_type, - entity_id=entity_id.id, - keys=keys, - start_ts=start_ts, - end_ts=end_ts, - interval=interval, - limit=str(limit), - agg=aggregation, - use_strict_data_types=use_strict_data_types) - - def save_device_attributes(self, device_id, scope, request): - device_id = self.get_id(device_id) - return self.telemetry_controller.save_device_attributes_using_post(device_id=device_id, scope=scope, - request=request) - - def save_entity_attributes_v1(self, entity_id: EntityId, scope, request): - return self.telemetry_controller.save_entity_attributes_v1_using_post(entity_type=entity_id.entity_type, - entity_id=entity_id.id, scope=scope, - request=request) - - def save_entity_attributes_v2(self, entity_id: EntityId, scope, request): - return self.telemetry_controller.save_entity_attributes_v2_using_post(entity_type=entity_id.entity_type, - entity_id=entity_id.id, scope=scope, - request=request) - - def save_entity_telemetry(self, entity_id: EntityId, scope, request): - return self.telemetry_controller.save_entity_telemetry_using_post(entity_type=entity_id.entity_type, - entity_id=entity_id.id, scope=scope, - request_body=request) - - def save_entity_telemetry_with_ttl(self, entity_id: EntityId, scope, ttl, request): - return self.telemetry_controller.save_entity_telemetry_with_ttl_using_post(entity_type=entity_id.entity_type, - entity_id=entity_id.id, scope=scope, - ttl=ttl, request_body=request) - - def delete_entity_timeseries(self, entity_id: EntityId, keys, delete_all_data_for_keys, start_ts, end_ts, - rewrite_latest_if_deleted): - return self.telemetry_controller.delete_entity_timeseries_using_delete(entity_type=entity_id.entity_type, - entity_id=entity_id.id, - keys=keys, - delete_all_data_for_keys=delete_all_data_for_keys, - start_ts=start_ts, - end_ts=end_ts, - rewrite_latest_if_deleted=rewrite_latest_if_deleted) - - def delete_entity_attributes(self, id, scope, keys): - if isinstance(keys, list): - keys = ",".join(keys) - if isinstance(id, DeviceId): - return self.telemetry_controller.delete_entity_attributes_using_delete(id.id, scope, keys) - elif isinstance(id, EntityId): - return self.telemetry_controller.delete_entity_attributes_using_delete1(entity_type=id.entity_type, - entity_id=id.id, - scope=scope, - keys=keys) - - """ Tenant endpoints. """ + def privacy_policy_accepted(self, ): + return self.sign_up_controller.privacy_policy_accepted_using_get() - def get_tenant_by_id(self, tenant_id: TenantId): - tenant_id = self.get_id(tenant_id) - return self.tenant_controller.get_tenant_by_id_using_get(tenant_id=tenant_id) + def get_recaptcha_public_key(self, ): + return self.sign_up_controller.get_recaptcha_public_key_using_get() - def save_tenant(self, tenant: Tenant): - return self.tenant_controller.save_tenant_using_post(tenant=tenant) + def accept_privacy_policy(self, ): + return self.sign_up_controller.accept_privacy_policy_using_post() - def delete_tenant(self, tenant_id: TenantId): - tenant_id = self.get_id(tenant_id) - self.tenant_controller.delete_tenant_using_delete(tenant_id=tenant_id) + def delete_tenant_account(self, ): + return self.sign_up_controller.delete_tenant_account_using_delete() - def get_tenants(self, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None, limit=100000): - return self.tenant_controller.get_tenants_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) + def delete_resource_v1(self, resource_id: EntityId): + resource_id = self.get_id(resource_id) + return self.tb_resource_controller.delete_resource_using_delete1(resource_id=resource_id) - def get_tenant_admins(self, tenant_id: TenantId, page_size=10, page=0, text_search=None, sort_property=None, - sort_order=None, limit=100000): - tenant_id = self.get_id(tenant_id) - return self.user_controller.get_tenant_admins_using_get(tenant_id=tenant_id, - page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) + def download_resource(self, resource_id: EntityId): + resource_id = self.get_id(resource_id) + return self.tb_resource_controller.download_resource_using_get(resource_id=resource_id) - def get_tenant_info_by_id(self, tenant_id: TenantId): - tenant_id = self.get_id(tenant_id) - return self.tenant_controller.get_tenant_info_by_id_using_get(tenant_id=tenant_id) + def get_lwm2m_list_objects_page(self, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): + return self.tb_resource_controller.get_lwm2m_list_objects_page_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_lwm2m_list_objects(self, sort_order: str, sort_property: str, object_ids=None): + return self.tb_resource_controller.get_lwm2m_list_objects_using_get(sort_order=sort_order, sort_property=sort_property, object_ids=object_ids) + + def get_resource_by_id(self, resource_id: EntityId): + resource_id = self.get_id(resource_id) + return self.tb_resource_controller.get_resource_by_id_using_get(resource_id=resource_id) - def get_tenant_infos(self, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): - return self.tenant_controller.get_tenant_infos_using_get(page_size=str(page_size), page=str(page), - text_search=text_search, sort_property=sort_property, - sort_order=sort_order) + def get_resource_info_by_id(self, resource_id: EntityId): + resource_id = self.get_id(resource_id) + return self.tb_resource_controller.get_resource_info_by_id_using_get(resource_id=resource_id) - """ Tenant profile endpoints """ + def get_resources(self, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): + return self.tb_resource_controller.get_resources_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def save_tenant_profile(self, tenant_profile: TenantProfile): - return self.tenant_profile_controller.save_tenant_profile_using_post(tenant_profile=tenant_profile) + def save_resource(self, body: TbResource): + return self.tb_resource_controller.save_resource_using_post(body=body) + + def get_current_o_auth2_info(self, ): + return self.o_auth_2_controller.get_current_o_auth2_info_using_get() + + def get_login_processing_url(self, ): + return self.o_auth_2_controller.get_login_processing_url_using_get() + + def get_o_auth2_clients(self, pkg_name=None, platform=None): + return self.o_auth_2_controller.get_o_auth2_clients_using_post(pkg_name=pkg_name, platform=platform) + + def save_o_auth2_info(self, body: OAuth2Info): + return self.o_auth_2_controller.save_o_auth2_info_using_post(body=body) def delete_tenant_profile(self, tenant_profile_id: TenantProfileId): tenant_profile_id = self.get_id(tenant_profile_id) return self.tenant_profile_controller.delete_tenant_profile_using_delete(tenant_profile_id=tenant_profile_id) + def get_default_tenant_profile_info(self, ): + return self.tenant_profile_controller.get_default_tenant_profile_info_using_get() + def get_tenant_profile_by_id(self, tenant_profile_id: TenantProfileId): tenant_profile_id = self.get_id(tenant_profile_id) return self.tenant_profile_controller.get_tenant_profile_by_id_using_get(tenant_profile_id=tenant_profile_id) + def get_tenant_profile_info_by_id(self, tenant_profile_id: TenantProfileId): + tenant_profile_id = self.get_id(tenant_profile_id) + return self.tenant_profile_controller.get_tenant_profile_info_by_id_using_get(tenant_profile_id=tenant_profile_id) + + def get_tenant_profile_infos(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.tenant_profile_controller.get_tenant_profile_infos_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_tenant_profiles(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.tenant_profile_controller.get_tenant_profiles_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def save_tenant_profile(self, body: TenantProfile): + return self.tenant_profile_controller.save_tenant_profile_using_post(body=body) + def set_default_tenant_profile(self, tenant_profile_id: TenantProfileId): tenant_profile_id = self.get_id(tenant_profile_id) return self.tenant_profile_controller.set_default_tenant_profile_using_post(tenant_profile_id=tenant_profile_id) - def get_default_tenant_profile_info(self): - return self.tenant_profile_controller.get_default_tenant_profile_info_using_get() + def delete_widgets_bundle(self, widgets_bundle_id: WidgetsBundleId): + widgets_bundle_id = self.get_id(widgets_bundle_id) + return self.widgets_bundle_controller.delete_widgets_bundle_using_delete(widgets_bundle_id=widgets_bundle_id) - def get_tenant_profile_info_by_id(self, tenant_profile_id: TenantProfileId): - tenant_profile_id = self.get_id(tenant_profile_id) - return self.tenant_profile_controller.get_tenant_profile_info_by_id_using_get( - tenant_profile_id=tenant_profile_id) - - def get_tenant_profile_infos(self, page_size: int, page: int, text_search=None, sort_property=None, - sort_order=None): - return self.tenant_profile_controller.get_tenant_profile_infos_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) - - def get_tenant_profiles(self, page_size: int, page: int, text_search=None, sort_property=None, - sort_order=None): - return self.tenant_profile_controller.get_tenant_profiles_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) - - """ User endpoints. """ + def get_widgets_bundle_by_id(self, widgets_bundle_id: WidgetsBundleId): + widgets_bundle_id = self.get_id(widgets_bundle_id) + return self.widgets_bundle_controller.get_widgets_bundle_by_id_using_get(widgets_bundle_id=widgets_bundle_id) - def get_user_by_id(self, user_id: UserId): - user_id = self.get_id(user_id) - return self.user_controller.get_user_by_id_using_get(user_id=user_id) + def get_widgets_bundles(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.widgets_bundle_controller.get_widgets_bundles_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def is_user_token_access_enabled(self): - return self.user_controller.is_user_token_access_enabled_using_get() + def get_widgets_bundles_v1(self, ): + return self.widgets_bundle_controller.get_widgets_bundles_using_get1() - def get_user_token(self, user_id: UserId): - user_id = self.get_id(user_id) - return self.user_controller.get_user_token_using_get(user_id=user_id) + def save_widgets_bundle(self, body: WidgetsBundle): + return self.widgets_bundle_controller.save_widgets_bundle_using_post(body=body) - def send_activation_email(self, email): - self.user_controller.send_activation_email_using_post(email=email) + def delete_device_profile(self, device_profile_id: DeviceProfileId): + device_profile_id = self.get_id(device_profile_id) + return self.device_profile_controller.delete_device_profile_using_delete(device_profile_id=device_profile_id) - def get_activation_link(self, user_id: UserId): - user_id = self.get_id(user_id) - return self.user_controller.get_activation_link_using_get(user_id=user_id) + def get_attributes_keys(self, device_profile_id=None): + device_profile_id = self.get_id(device_profile_id) + return self.device_profile_controller.get_attributes_keys_using_get(device_profile_id=device_profile_id) - def delete_user(self, user_id: UserId): - user_id = self.get_id(user_id) - self.user_controller.delete_user_using_delete(user_id=user_id) + def get_default_device_profile_info(self, ): + return self.device_profile_controller.get_default_device_profile_info_using_get() - def get_customer_users(self, customer_id: CustomerId, page_size=10, page=0, text_search=None, sort_property=None, - sort_order=None, limit=100000): - customer_id = self.get_id(customer_id) - return self.user_controller.get_customer_users_using_get(customer_id=customer_id, - page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) - - def set_user_credentials_enabled(self, user_id: UserId, user_credentials_enabled): - user_id = self.get_id(user_id) - return self.user_controller.set_user_credentials_enabled_using_post(user_id=user_id, - user_credentials_enabled=user_credentials_enabled) + def get_device_profile_by_id(self, device_profile_id: DeviceProfileId): + device_profile_id = self.get_id(device_profile_id) + return self.device_profile_controller.get_device_profile_by_id_using_get(device_profile_id=device_profile_id) + + def get_device_profile_info_by_id(self, device_profile_id: DeviceProfileId): + device_profile_id = self.get_id(device_profile_id) + return self.device_profile_controller.get_device_profile_info_by_id_using_get(device_profile_id=device_profile_id) - """ Widget endpoints. """ + def get_device_profile_infos(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None, transport_type=None): + return self.device_profile_controller.get_device_profile_infos_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order, transport_type=transport_type) - def get_widgets_bundle_by_id(self, widgets_bundle_id: WidgetsBundleId): - widgets_bundle_id = self.get_id(widgets_bundle_id) - return self.widgets_bundle_controller.get_widgets_bundle_by_id_using_get(widgets_bundle_id=widgets_bundle_id) + def get_device_profiles(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.device_profile_controller.get_device_profiles_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_timeseries_keys(self, device_profile_id=None): + device_profile_id = self.get_id(device_profile_id) + return self.device_profile_controller.get_timeseries_keys_using_get(device_profile_id=device_profile_id) - def save_widgets_bundle(self, widgets_bundle: WidgetsBundle): - return self.widgets_bundle_controller.save_widgets_bundle_using_post(widgets_bundle=widgets_bundle) + def save_device_profile(self, body: DeviceProfile): + return self.device_profile_controller.save_device_profile_using_post(body=body) - def delete_widgets_bundle(self, widgets_bundle_id: WidgetsBundleId): - widgets_bundle_id = self.get_id(widgets_bundle_id) - self.widgets_bundle_controller.delete_widgets_bundle_using_delete(widgets_bundle_id=widgets_bundle_id) + def set_default_device_profile(self, device_profile_id: DeviceProfileId): + device_profile_id = self.get_id(device_profile_id) + return self.device_profile_controller.set_default_device_profile_using_post(device_profile_id=device_profile_id) - def get_widgets_bundles(self, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None, - limit=100000): - return self.widgets_bundle_controller.get_widgets_bundles_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) + def get_tenant_dashboards(self, page_size: str, page: str, mobile=None, text_search=None, sort_property=None, sort_order=None): + return self.dashboard_controller.get_tenant_dashboards_using_get(page_size=page_size, page=page, mobile=mobile, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - """ Widget type endpoints""" + def delete_dashboard(self, dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.delete_dashboard_using_delete(dashboard_id=dashboard_id) + + def get_dashboard_by_id(self, dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.get_dashboard_by_id_using_get(dashboard_id=dashboard_id) + + def set_tenant_home_dashboard_info(self, body: HomeDashboardInfo): + return self.dashboard_controller.set_tenant_home_dashboard_info_using_post(body=body) + + def get_server_time(self, ): + return self.dashboard_controller.get_server_time_using_get() + + def get_home_dashboard_info(self, ): + return self.dashboard_controller.get_home_dashboard_info_using_get() + + def get_max_datapoints_limit(self, ): + return self.dashboard_controller.get_max_datapoints_limit_using_get() + + def get_home_dashboard(self, ): + return self.dashboard_controller.get_home_dashboard_using_get() + + def get_tenant_home_dashboard_info(self, ): + return self.dashboard_controller.get_tenant_home_dashboard_info_using_get() + + def get_dashboard_info_by_id(self, dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.get_dashboard_info_by_id_using_get(dashboard_id=dashboard_id) + + def get_tenant_dashboards_v1(self, tenant_id: TenantId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + tenant_id = self.get_id(tenant_id) + return self.dashboard_controller.get_tenant_dashboards_using_get1(tenant_id=tenant_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def count_entities_by_query(self, body: EntityCountQuery): + return self.entity_query_controller.count_entities_by_query_using_post(body=body) + + def find_alarm_data_by_query(self, body: AlarmDataQuery): + return self.entity_query_controller.find_alarm_data_by_query_using_post(body=body) + + def find_entity_data_by_query(self, body: EntityDataQuery): + return self.entity_query_controller.find_entity_data_by_query_using_post(body=body) + + def find_entity_timeseries_and_attributes_keys_by_query(self, body: EntityDataQuery, timeseries: bool, attributes: bool): + return self.entity_query_controller.find_entity_timeseries_and_attributes_keys_by_query_using_post(body=body, timeseries=timeseries, attributes=attributes) + + def delete_widget_type(self, widget_type_id: WidgetTypeId): + widget_type_id = self.get_id(widget_type_id) + return self.widget_type_controller.delete_widget_type_using_delete(widget_type_id=widget_type_id) + + def get_bundle_widget_types_details(self, is_system: str, bundle_alias: str): + return self.widget_type_controller.get_bundle_widget_types_details_using_get(is_system=is_system, bundle_alias=bundle_alias) + + def get_bundle_widget_types_infos(self, is_system: str, bundle_alias: str): + return self.widget_type_controller.get_bundle_widget_types_infos_using_get(is_system=is_system, bundle_alias=bundle_alias) + + def get_bundle_widget_types(self, is_system: str, bundle_alias: str): + return self.widget_type_controller.get_bundle_widget_types_using_get(is_system=is_system, bundle_alias=bundle_alias) def get_widget_type_by_id(self, widget_type_id: WidgetTypeId): widget_type_id = self.get_id(widget_type_id) return self.widget_type_controller.get_widget_type_by_id_using_get(widget_type_id=widget_type_id) - def save_widget_type(self, widget_type: WidgetType): - return self.widget_type_controller.save_widget_type_using_post(widget_type=widget_type) + def get_widget_type(self, is_system: str, bundle_alias: str, alias: str): + return self.widget_type_controller.get_widget_type_using_get(is_system=is_system, bundle_alias=bundle_alias, alias=alias) - def delete_widget_type(self, widget_type_id: WidgetTypeId): - widget_type_id = self.get_id(widget_type_id) - self.widget_type_controller.delete_widget_type_using_delete(widget_type_id=widget_type_id) + def save_widget_type(self, body: WidgetTypeDetails): + return self.widget_type_controller.save_widget_type_using_post(body=body) - def get_bundle_widget_types(self, is_system, bundle_alias): - is_system = str(is_system).lower() - return self.widget_type_controller.get_bundle_widget_types_using_get(is_system=is_system, - bundle_alias=bundle_alias) + def get_audit_logs_by_customer_id(self, customer_id: CustomerId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None, action_types=None): + customer_id = self.get_id(customer_id) + return self.audit_log_controller.get_audit_logs_by_customer_id_using_get(customer_id=customer_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, action_types=action_types) - def get_widget_type(self, is_system, bundle_alias, alias): - is_system = str(is_system).lower() - return self.widget_type_controller.get_widget_type_using_get(is_system=is_system, bundle_alias=bundle_alias, - alias=alias) + def get_audit_logs_by_entity_id(self, entity_type: str, entity_id: EntityId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None, action_types=None): + entity_id = self.get_id(entity_id) + return self.audit_log_controller.get_audit_logs_by_entity_id_using_get(entity_type=entity_type, entity_id=entity_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, action_types=action_types) - def get_bundle_widget_types_details(self, is_system, bundle_alias): - is_system = str(is_system).lower() - return self.widget_type_controller.get_bundle_widget_types_details_using_get(is_system=is_system, - bundle_alias=bundle_alias) + def get_audit_logs_by_user_id(self, user_id: UserId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None, action_types=None): + user_id = self.get_id(user_id) + return self.audit_log_controller.get_audit_logs_by_user_id_using_get(user_id=user_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, action_types=action_types) - def get_bundle_widget_types_infos(self, is_system, bundle_alias): - is_system = str(is_system).lower() - return self.widget_type_controller.get_bundle_widget_types_infos_using_get(is_system=is_system, - bundle_alias=bundle_alias) + def get_audit_logs(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None, action_types=None): + 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) - """ Device profile endpoints """ + def get_lwm2m_bootstrap_security_info(self, is_bootstrap_server: bool): + return self.lwm_2m_controller.get_lwm2m_bootstrap_security_info_using_get(is_bootstrap_server=is_bootstrap_server) - def save_device_profile(self, device_profile: DeviceProfile): - return self.device_profile_controller.save_device_profile_using_post(device_profile=device_profile) + def get_component_descriptor_by_clazz(self, component_descriptor_clazz: str): + return self.component_descriptor_controller.get_component_descriptor_by_clazz_using_get(component_descriptor_clazz=component_descriptor_clazz) - def get_attributes_keys(self, device_profile_id=None): - return self.device_profile_controller.get_attributes_keys_using_get(device_profile_id=device_profile_id) + def get_component_descriptors_by_type(self, component_type: str, rule_chain_type=None): + return self.component_descriptor_controller.get_component_descriptors_by_type_using_get(component_type=component_type, rule_chain_type=rule_chain_type) - def get_device_profile_timeseries_keys(self, device_profile_id=None): - return self.device_profile_controller.get_timeseries_keys_using_get(device_profile_id=device_profile_id) + def get_component_descriptors_by_types(self, component_types: str, rule_chain_type=None): + return self.component_descriptor_controller.get_component_descriptors_by_types_using_get(component_types=component_types, rule_chain_type=rule_chain_type) - def delete_device_profile(self, device_profile_id: DeviceProfileId): - device_profile_id = self.get_id(device_profile_id) - return self.device_profile_controller.delete_device_profile_using_delete(device_profile_id=device_profile_id) + def get_tenants(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.tenant_controller.get_tenants_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_device_profile_by_id(self, device_profile_id: DeviceProfileId): - device_profile_id = self.get_id(device_profile_id) - return self.device_profile_controller.get_device_profile_by_id_using_get(device_profile_id=device_profile_id) + def get_tenant_info_by_id(self, tenant_id: TenantId): + tenant_id = self.get_id(tenant_id) + return self.tenant_controller.get_tenant_info_by_id_using_get(tenant_id=tenant_id) - def save_default_device_profile(self, device_profile_id: DeviceProfileId): - device_profile_id = self.get_id(device_profile_id) - return self.device_profile_controller.save_default_device_profile_using_post( - device_profile_id=device_profile_id) + def delete_tenant(self, tenant_id: TenantId): + tenant_id = self.get_id(tenant_id) + return self.tenant_controller.delete_tenant_using_delete(tenant_id=tenant_id) - def get_default_device_profile_info(self): - return self.device_profile_controller.get_default_device_profile_info_using_get() + def save_tenant(self, body: Tenant): + return self.tenant_controller.save_tenant_using_post(body=body) - def get_device_profile_info_by_id(self, device_profile_id: DeviceProfileId): - return self.device_profile_controller.get_device_profile_info_by_id_using_get( - device_profile_id=device_profile_id) - - def get_device_profile_infos(self, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None, - transport_type=None): - return self.device_profile_controller.get_device_profile_infos_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, - transport_type=transport_type) - - def get_device_profiles(self, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): - return self.device_profile_controller.get_device_profiles_using_get(page_size=str(page_size), page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) - - """ Queue endpoints """ + def get_tenant_infos(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.tenant_controller.get_tenant_infos_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_tenant_by_id(self, tenant_id: TenantId): + tenant_id = self.get_id(tenant_id) + return self.tenant_controller.get_tenant_by_id_using_get(tenant_id=tenant_id) + + def save_ota_package_data(self, file: str, checksum_algorithm: str, ota_package_id: OtaPackageId, checksum=None): + ota_package_id = self.get_id(ota_package_id) + return self.ota_package_controller.save_ota_package_data_using_post(file=file, checksum_algorithm=checksum_algorithm, ota_package_id=ota_package_id, checksum=checksum) + + def save_ota_package_info(self, body: SaveOtaPackageInfoRequest): + return self.ota_package_controller.save_ota_package_info_using_post(body=body) + + def download_ota_package(self, ota_package_id: OtaPackageId): + ota_package_id = self.get_id(ota_package_id) + return self.ota_package_controller.download_ota_package_using_get(ota_package_id=ota_package_id) + + def get_ota_package_info_by_id(self, ota_package_id: OtaPackageId): + 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 delete_ota_package(self, ota_package_id: OtaPackageId): + 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) + + def get_ota_package_by_id(self, ota_package_id: OtaPackageId): + ota_package_id = self.get_id(ota_package_id) + return self.ota_package_controller.get_ota_package_by_id_using_get(ota_package_id=ota_package_id) + + def get_ota_packages(self, device_profile_id: DeviceProfileId, type: str, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): + device_profile_id = self.get_id(device_profile_id) + return self.ota_package_controller.get_ota_packages_using_get(device_profile_id=device_profile_id, type=type, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_ota_packages_v1(self, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): + return self.ota_package_controller.get_ota_packages_using_get1(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_tenant_queues_by_service_type(self, service_type: str): - return self.queue_controller.get_tenant_queues_by_service_type_using_get(service_type=service_type) def __load_controllers(self): - self.auth_controller = AuthControllerApi(self.api_client) - self.admin_controller = AdminControllerApi(self.api_client) - self.alarm_controller = AlarmControllerApi(self.api_client) - self.asset_controller = AssetControllerApi(self.api_client) self.audit_log_controller = AuditLogControllerApi(self.api_client) - self.component_descriptor_controller = ComponentDescriptorControllerApi(self.api_client) - self.customer_controller = CustomerControllerApi(self.api_client) - self.dashboard_controller = DashboardControllerApi(self.api_client) - self.device_controller = DeviceControllerApi(self.api_client) - self.device_profile_controller = DeviceProfileControllerApi(self.api_client) - self.edge_controller = EdgeControllerApi(self.api_client) - self.edge_event_controller = EdgeEventControllerApi(self.api_client) - self.entity_relation_controller = EntityRelationControllerApi(self.api_client) + self.o_auth2_config_template_controller = OAuth2ConfigTemplateControllerApi(self.api_client) self.entity_view_controller = EntityViewControllerApi(self.api_client) self.entity_query_controller = EntityQueryControllerApi(self.api_client) + self.o_auth2_controller = OAuth2ControllerApi(self.api_client) + self.entity_relation_controller = EntityRelationControllerApi(self.api_client) + self.rpc_v2_controller = RpcV2ControllerApi(self.api_client) + self.edge_controller = EdgeControllerApi(self.api_client) + self.admin_controller = AdminControllerApi(self.api_client) + self.user_controller = UserControllerApi(self.api_client) + self.asset_controller = AssetControllerApi(self.api_client) + self.widgets_bundle_controller = WidgetsBundleControllerApi(self.api_client) + self.tenant_profile_controller = TenantProfileControllerApi(self.api_client) self.event_controller = EventControllerApi(self.api_client) - self.queue_controller = QueueControllerApi(self.api_client) - self.rpc_controller = RpcControllerApi(self.api_client) - self.lwm_2m_controller = Lwm2mControllerApi(self.api_client) - self.ota_package_controller = OtaPackageControllerApi(self.api_client) - self.tb_resource_controller = TbResourceControllerApi(self.api_client) - self.rule_chain_controller = RuleChainControllerApi(self.api_client) + self.lwm2m_controller = Lwm2mControllerApi(self.api_client) + self.dashboard_controller = DashboardControllerApi(self.api_client) + self.component_descriptor_controller = ComponentDescriptorControllerApi(self.api_client) + self.device_profile_controller = DeviceProfileControllerApi(self.api_client) + self.customer_controller = CustomerControllerApi(self.api_client) self.telemetry_controller = TelemetryControllerApi(self.api_client) self.tenant_controller = TenantControllerApi(self.api_client) - self.tenant_profile_controller = TenantProfileControllerApi(self.api_client) - self.user_controller = UserControllerApi(self.api_client) + self.rpc_v1_controller = RpcV1ControllerApi(self.api_client) self.widget_type_controller = WidgetTypeControllerApi(self.api_client) - self.widgets_bundle_controller = WidgetsBundleControllerApi(self.api_client) + self.device_controller = DeviceControllerApi(self.api_client) + self.rule_chain_controller = RuleChainControllerApi(self.api_client) + self.tb_resource_controller = TbResourceControllerApi(self.api_client) + self.auth_controller = AuthControllerApi(self.api_client) + self.queue_controller = QueueControllerApi(self.api_client) + 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) @staticmethod def get_type(type): return type.entity_type if hasattr(type, "entity_type") else type + @staticmethod def get_id(id): return id.id if hasattr(id, "id") else id diff --git a/tb_rest_client/rest_client_ce.py b/tb_rest_client/rest_client_ce.py index 0fb30846..553c7527 100644 --- a/tb_rest_client/rest_client_ce.py +++ b/tb_rest_client/rest_client_ce.py @@ -23,478 +23,588 @@ class RestClientCE(RestClientBase): def __init__(self, base_url): super().__init__(base_url) - """ Alarm endpoints """ + def get_asset_types(self, ): + return self.asset_controller.get_asset_types_using_get() - def get_all_alarms(self, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None, - start_time=None, end_time=None, fetch_originator=None): - return self.alarm_controller.get_all_alarms_using_get(page_size=str(page_size), page=str(page), - 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_edge_assets(self, edge_id: EdgeId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None): + edge_id = self.get_id(edge_id) + return self.asset_controller.get_edge_assets_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) - """ User endpoints """ + def get_asset_info_by_id(self, asset_id: AssetId): + asset_id = self.get_id(asset_id) + return self.asset_controller.get_asset_info_by_id_using_get(asset_id=asset_id) - def save_user(self, user: User, send_activation_mail): - return self.user_controller.save_user_using_post(user=user, send_activation_mail=send_activation_mail) + def assign_asset_to_public_customer(self, asset_id: AssetId): + asset_id = self.get_id(asset_id) + return self.asset_controller.assign_asset_to_public_customer_using_post(asset_id=asset_id) - """ Asset endpoints """ + def find_by_query(self, body: AssetSearchQuery): + return self.asset_controller.find_by_query_using_post(body=body) - def save_asset(self, asset: Asset): - return self.asset_controller.save_asset_using_post(asset) + def get_tenant_assets(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + 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 assign_asset_to_customer(self, customer_id: CustomerId, asset_id: AssetId): - return self.asset_controller.assign_asset_to_customer_using_post(customer_id=customer_id, asset_id=asset_id) + def save_asset(self, body: Asset): + return self.asset_controller.save_asset_using_post(body=body) + + def get_assets_by_ids(self, asset_ids: list): + return self.asset_controller.get_assets_by_ids_using_get(asset_ids=asset_ids) + + def get_customer_asset_infos(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + 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_asset_by_id(self, asset_id: AssetId): + asset_id = self.get_id(asset_id) + return self.asset_controller.get_asset_by_id_using_get(asset_id=asset_id) + + def get_tenant_asset_infos(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + 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) + + def assign_asset_to_edge(self, edge_id: EdgeId, asset_id: AssetId): + 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 unassign_asset_from_customer(self, asset_id: AssetId): + asset_id = self.get_id(asset_id) return self.asset_controller.unassign_asset_from_customer_using_delete(asset_id=asset_id) - def assign_asset_to_public_customer(self, asset_id: AssetId): - return self.asset_controller.assign_asset_to_public_customer_using_post(asset_id=asset_id) + def unassign_asset_from_edge(self, edge_id: EdgeId, asset_id: AssetId): + edge_id = self.get_id(edge_id) + 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_asset_info_by_id(self, asset_id: AssetId): + def delete_asset(self, asset_id: AssetId): asset_id = self.get_id(asset_id) - return self.asset_controller.get_asset_info_by_id_using_get(asset_id) + return self.asset_controller.delete_asset_using_delete(asset_id=asset_id) - def get_customer_asset_infos(self, customer_id: CustomerId, page_size: int, page: int): + def get_customer_assets(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): customer_id = self.get_id(customer_id) - return self.asset_controller.get_customer_asset_infos_using_get(customer_id, page_size=str(page_size), - page=str(page)) + 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 unassign_asset_from_edge(self, edge_id: str, asset_id: AssetId): - asset_id = self.get_id(asset_id) - return self.asset_controller.unassign_asset_from_edge_using_delete(edge_id, asset_id) + def get_tenant_asset(self, asset_name: str): + return self.asset_controller.get_tenant_asset_using_get(asset_name=asset_name) - def assign_asset_to_edge(self, edge_id: str, asset_id: AssetId): + def assign_asset_to_customer(self, customer_id: CustomerId, asset_id: AssetId): + customer_id = self.get_id(customer_id) asset_id = self.get_id(asset_id) - return self.asset_controller.assign_asset_to_edge_using_post(edge_id, asset_id) + return self.asset_controller.assign_asset_to_customer_using_post(customer_id=customer_id, asset_id=asset_id) - def get_edge_assets(self, edge_id: str, page_size: int, page: int, type=None, text_search=None, sort_property=None, - sort_order=None, start_time=None, end_time=None): - return self.asset_controller.get_edge_assets_using_get(edge_id=edge_id, page_size=str(page_size), - page=str(page), type=type, text_search=text_search, - sort_property=sort_property, sort_order=sort_order, - start_time=start_time, end_time=end_time) + def sync_edge(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.sync_edge_using_post(edge_id=edge_id) - def get_tenant_asset_infos(self, page_size: int, page: int, type=None, text_search=None, sort_property=None, - sort_order=None): - return self.asset_controller.get_tenant_asset_infos_using_get(page_size=str(page_size), page=str(page), - type=type, text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) + def get_edge_types(self, ): + return self.edge_controller.get_edge_types_using_get() - """ Customer endpoints """ + def save_edge(self, body: Edge): + return self.edge_controller.save_edge_using_post(body=body) - def save_customer(self, customer: Customer): - return self.customer_controller.save_customer_using_post(customer) + def unassign_edge_from_customer(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.unassign_edge_from_customer_using_delete(edge_id=edge_id) - """ Dashboard endpoints """ + def get_customer_edges(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + customer_id = self.get_id(customer_id) + return self.edge_controller.get_customer_edges_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 assign_dashboard_to_customer(self, customer_id: CustomerId, dashboard_id: DashboardId): - return self.dashboard_controller.assign_dashboard_to_customer_using_post(customer_id=customer_id, - dashboard_id=dashboard_id) + def get_customer_edge_infos(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + customer_id = self.get_id(customer_id) + return self.edge_controller.get_customer_edge_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 unassign_dashboard_from_customer(self, customer_id: CustomerId, dashboard_id: DashboardId): - return self.dashboard_controller.unassign_dashboard_from_customer_using_delete(customer_id=customer_id, - dashboard_id=dashboard_id) + def check_instance(self, body: object): + return self.edge_controller.check_instance_using_post(body=body) - def update_dashboard_customers(self, dashboard_id: DashboardId, customerIds): - return self.dashboard_controller.update_dashboard_customers_using_post(dashboard_id=dashboard_id, - str_customer_ids=customerIds) + def is_edges_support_enabled(self, ): + return self.edge_controller.is_edges_support_enabled_using_get() - def add_dashboard_customers(self, dashboard_id: DashboardId, customerIds): - return self.dashboard_controller.add_dashboard_customers_using_post(dashboard_id=dashboard_id, - str_customer_ids=customerIds) + def get_edges_by_ids(self, edge_ids: list): + return self.edge_controller.get_edges_by_ids_using_get(edge_ids=edge_ids) - def remove_dashboard_customers(self, dashboard_id: DashboardId, customerIds): - return self.dashboard_controller.remove_dashboard_customers_using_post(dashboard_id=dashboard_id, - str_customer_ids=customerIds) + def find_missing_to_related_rule_chains(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.find_missing_to_related_rule_chains_using_get(edge_id=edge_id) - def assign_dashboard_to_public_customer(self, dashboard_id: DashboardId): - return self.dashboard_controller.assign_dashboard_to_public_customer_using_post(dashboard_id=dashboard_id) + def get_tenant_edges(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.edge_controller.get_tenant_edges_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def unassign_dashboard_from_public_customer(self, dashboard_id: DashboardId): - return self.dashboard_controller.unassign_dashboard_from_public_customer_using_delete(dashboard_id=dashboard_id) + def delete_edge(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.delete_edge_using_delete(edge_id=edge_id) - def save_dashboard(self, dashboard: Dashboard): - return self.dashboard_controller.save_dashboard_using_post(dashboard) + def find_by_query_v2(self, body: EdgeSearchQuery): + return self.edge_controller.find_by_query_using_post2(body=body) - def get_customer_dashboards(self, customer_id: CustomerId, page_size: int, page: int, text_search=None, - sort_property=None, sort_order=None): - return self.dashboard_controller.get_customer_dashboards_using_get(customer_id=customer_id, - page_size=str(page_size), page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) + def set_root_rule_chain(self, edge_id: EdgeId, rule_chain_id: RuleChainId): + edge_id = self.get_id(edge_id) + rule_chain_id = self.get_id(rule_chain_id) + return self.edge_controller.set_root_rule_chain_using_post(edge_id=edge_id, rule_chain_id=rule_chain_id) - def get_home_dashboard_info(self): - return self.dashboard_controller.get_home_dashboard_info_using_get() + def assign_edge_to_public_customer(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.assign_edge_to_public_customer_using_post(edge_id=edge_id) - def unassign_dashboard_from_edge(self, edge_id: str, dashboard_id: DashboardId): - dashboard_id = self.get_id(dashboard_id) - return self.dashboard_controller.unassign_dashboard_from_edge_using_delete(edge_id=edge_id, - dashboard_id=dashboard_id) + def get_tenant_edge_infos(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.edge_controller.get_tenant_edge_infos_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def assign_dashboard_to_edge(self, edge_id: str, dashboard_id: DashboardId): - dashboard_id = self.get_id(dashboard_id) - return self.dashboard_controller.assign_dashboard_to_edge_using_post(edge_id=edge_id, dashboard_id=dashboard_id) + def get_edge_by_id(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.get_edge_by_id_using_get(edge_id=edge_id) - def get_edge_dashboards(self, edge_id: str, page_size: int, page: int, text_search=None, sort_property=None, - sort_order=None, start_time=None, end_time=None): - return self.dashboard_controller.get_edge_dashboards_using_get(edge_id=edge_id, page_size=str(page_size), - page=str(page), text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, start_time=start_time, - end_time=end_time) + def get_tenant_edge(self, edge_name: str): + return self.edge_controller.get_tenant_edge_using_get(edge_name=edge_name) - """ Device endpoints """ + def get_edge_info_by_id(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.get_edge_info_by_id_using_get(edge_id=edge_id) - def assign_device_to_customer(self, customer_id: CustomerId, device_id: DeviceId): - return self.device_controller.assign_device_to_customer_using_post(customer_id=customer_id, device_id=device_id) + def get_edges(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.edge_controller.get_edges_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def unassign_device_from_customer(self, customer_id: CustomerId, device_id: DeviceId): - return self.device_controller.unassign_device_from_customer_using_delete(customer_id=customer_id, - device_id=device_id) + def assign_edge_to_customer(self, customer_id: CustomerId, edge_id: EdgeId): + customer_id = self.get_id(customer_id) + edge_id = self.get_id(edge_id) + return self.edge_controller.assign_edge_to_customer_using_post(customer_id=customer_id, edge_id=edge_id) - def assign_device_to_public_customer(self, device_id: DeviceId): - return self.device_controller.assign_device_to_public_customer_using_post(device_id=device_id) + def activate_instance(self, license_secret: str, release_date: str): + return self.edge_controller.activate_instance_using_post(license_secret=license_secret, release_date=release_date) + + def get_persisted_rpc(self, rpc_id: RpcId): + rpc_id = self.get_id(rpc_id) + return self.rpc_v_2_controller.get_persisted_rpc_using_get(rpc_id=rpc_id) + + def handle_two_way_device_rpc_request_v1(self, body: str, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.rpc_v_2_controller.handle_two_way_device_rpc_request_using_post1(body=body, device_id=device_id) - def get_customer_device_infos(self, customer_id: CustomerId, page_size: int, page: int, type=None, text_search=None, - sort_property=None, sort_order=None): + def handle_one_way_device_rpc_request_v1(self, body: str, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.rpc_v_2_controller.handle_one_way_device_rpc_request_using_post1(body=body, device_id=device_id) + + def delete_resource(self, rpc_id: RpcId): + rpc_id = self.get_id(rpc_id) + return self.rpc_v_2_controller.delete_resource_using_delete(rpc_id=rpc_id) + + def get_persisted_rpc_by_device(self, device_id: DeviceId, page_size: int, page: int, rpc_status: str, text_search=None, sort_property=None, sort_order=None): + device_id = self.get_id(device_id) + return self.rpc_v_2_controller.get_persisted_rpc_by_device_using_get(device_id=device_id, page_size=page_size, page=page, rpc_status=rpc_status, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_edge_events(self, edge_id: EdgeId, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None): + edge_id = self.get_id(edge_id) + return self.edge_event_controller.get_edge_events_using_get(edge_id=edge_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) + + def delete_customer(self, customer_id: CustomerId): + customer_id = self.get_id(customer_id) + return self.customer_controller.delete_customer_using_delete(customer_id=customer_id) + + def get_short_customer_info_by_id(self, customer_id: CustomerId): customer_id = self.get_id(customer_id) + return self.customer_controller.get_short_customer_info_by_id_using_get(customer_id=customer_id) - return self.device_controller.get_customer_device_infos_using_get(customer_id=customer_id, - page_size=str(page_size), - page=str(page), - type=type, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) + def get_tenant_customer(self, customer_title: str): + return self.customer_controller.get_tenant_customer_using_get(customer_title=customer_title) - def get_device_info_by_id(self, device_id: DeviceId): - return self.device_controller.get_device_info_by_id_using_get(device_id=device_id.id) + def get_customers(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.customer_controller.get_customers_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def count_by_device_profile_and_empty_ota_package(self, ota_package_type, device_profile_id): - return self.device_controller.count_by_device_profile_and_empty_ota_package_using_get( - ota_package_type=ota_package_type, device_profile_id=device_profile_id) + def get_customer_title_by_id(self, customer_id: CustomerId): + customer_id = self.get_id(customer_id) + return self.customer_controller.get_customer_title_by_id_using_get(customer_id=customer_id) - def unassign_device_from_edge(self, edge_id, device_id): - return self.device_controller.unassign_device_from_edge_using_delete(edge_id=edge_id, device_id=device_id) + def get_customer_by_id(self, customer_id: CustomerId): + customer_id = self.get_id(customer_id) + return self.customer_controller.get_customer_by_id_using_get(customer_id=customer_id) - def assign_device_to_edge(self, edge_id, device_id): - return self.device_controller.assign_device_to_edge_using_post(edge_id=edge_id, device_id=device_id) + def save_customer(self, body: Customer): + return self.customer_controller.save_customer_using_post(body=body) - def get_edge_devices(self, edge_id, page_size: int, page: int, type=None, text_search=None, sort_property=None, - sort_order=None, start_time=None, end_time=None): - return self.device_controller.get_edge_devices_using_get(edge_id=edge_id, page_size=str(page_size), - page=str(page), type=type, text_search=text_search, - sort_property=sort_property, sort_order=sort_order, - start_time=start_time, end_time=end_time) + def get_user_by_id(self, user_id: UserId): + user_id = self.get_id(user_id) + return self.user_controller.get_user_by_id_using_get(user_id=user_id) - def get_tenant_device_infos(self, page_size: int, page: int, type=None, device_profile_id=None, text_search=None, - sort_property=None, sort_order=None): - return self.device_controller.get_tenant_device_infos_using_get(page_size=str(page_size), - page=str(page), type=type, - device_profile_id=device_profile_id, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) + def send_activation_email(self, email: str): + return self.user_controller.send_activation_email_using_post(email=email) - """ Edge endpoints """ + def set_user_credentials_enabled(self, user_id: UserId, user_credentials_enabled=None): + user_id = self.get_id(user_id) + return self.user_controller.set_user_credentials_enabled_using_post(user_id=user_id, user_credentials_enabled=user_credentials_enabled) - def unassign_edge_from_customer(self, edge_id: EdgeId): + def get_customer_users(self, customer_id: CustomerId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + customer_id = self.get_id(customer_id) + return self.user_controller.get_customer_users_using_get(customer_id=customer_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_tenant_admins(self, tenant_id: TenantId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + tenant_id = self.get_id(tenant_id) + return self.user_controller.get_tenant_admins_using_get(tenant_id=tenant_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_user_token(self, user_id: UserId): + user_id = self.get_id(user_id) + return self.user_controller.get_user_token_using_get(user_id=user_id) + + def get_activation_link(self, user_id: UserId): + user_id = self.get_id(user_id) + return self.user_controller.get_activation_link_using_get(user_id=user_id) + + def delete_user(self, user_id: UserId): + user_id = self.get_id(user_id) + return self.user_controller.delete_user_using_delete(user_id=user_id) + + def save_user(self, body: User, send_activation_mail=None): + return self.user_controller.save_user_using_post(body=body, send_activation_mail=send_activation_mail) + + def is_user_token_access_enabled(self, ): + return self.user_controller.is_user_token_access_enabled_using_get() + + def get_users(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.user_controller.get_users_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def delete_device(self, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.device_controller.delete_device_using_delete(device_id=device_id) + + def claim_device(self, device_name: str, body=None): + return self.device_controller.claim_device_using_post(device_name=device_name, body=body) + + def count_by_device_profile_and_empty_ota_package(self, ota_package_type: str, device_profile_id: DeviceProfileId): + device_profile_id = self.get_id(device_profile_id) + return self.device_controller.count_by_device_profile_and_empty_ota_package_using_get(ota_package_type=ota_package_type, device_profile_id=device_profile_id) + + def assign_device_to_tenant(self, tenant_id: TenantId, device_id: DeviceId): + tenant_id = self.get_id(tenant_id) + device_id = self.get_id(device_id) + return self.device_controller.assign_device_to_tenant_using_post(tenant_id=tenant_id, device_id=device_id) + + def get_edge_devices(self, edge_id: EdgeId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None): edge_id = self.get_id(edge_id) - return self.edge_controller.unassign_edge_from_customer_using_delete(edge_id=edge_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) - def assign_edge_to_public_customer(self, edge_id: EdgeId): + def unassign_device_from_edge(self, edge_id: EdgeId, device_id: DeviceId): edge_id = self.get_id(edge_id) - return self.edge_controller.assign_edge_to_public_customer_using_post(edge_id=edge_id) + device_id = self.get_id(device_id) + return self.device_controller.unassign_device_from_edge_using_delete(edge_id=edge_id, device_id=device_id) - def assign_edge_to_customer(self, customer_id: CustomerId, edge_id: EdgeId): - customer_id = self.get_id(customer_id) + def get_tenant_devices(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.device_controller.get_tenant_devices_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def re_claim_device(self, device_name: str): + return self.device_controller.re_claim_device_using_delete(device_name=device_name) + + def assign_device_to_edge(self, edge_id: EdgeId, device_id: DeviceId): edge_id = self.get_id(edge_id) - return self.edge_controller.edge_controllerassign_edge_to_customer_using_post(customer_id=customer_id, - edge_id=edge_id) + device_id = self.get_id(device_id) + return self.device_controller.assign_device_to_edge_using_post(edge_id=edge_id, device_id=device_id) + + def get_device_credentials_by_device_id(self, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.device_controller.get_device_credentials_by_device_id_using_get(device_id=device_id) + + def get_device_info_by_id(self, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.device_controller.get_device_info_by_id_using_get(device_id=device_id) + + def get_device_by_id(self, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.device_controller.get_device_by_id_using_get(device_id=device_id) - def get_customer_edge_infos(self, customer_id: CustomerId, page_size: int, page: int, type=None, text_search=None, - sort_property=None, sort_order=None): + def get_customer_device_infos(self, customer_id: CustomerId, page_size: str, page: str, type=None, device_profile_id=None, text_search=None, sort_property=None, sort_order=None): customer_id = self.get_id(customer_id) - return self.edge_controller.get_customer_edge_infos_using_get(customer_id=customer_id, page_size=str(page_size), - page=str(page), type=type, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) - - def get_customer_edges(self, customer_id: CustomerId, page_size: int, page: int, type=None, text_search=None, - sort_property=None, sort_order=None): + 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) + + def assign_device_to_customer(self, customer_id: CustomerId, device_id: DeviceId): customer_id = self.get_id(customer_id) - return self.edge_controller.get_customer_edges_using_get(customer_id=customer_id, page_size=str(page_size), - page=str(page), type=type, text_search=text_search, - sort_property=sort_property, sort_order=sort_order) + device_id = self.get_id(device_id) + return self.device_controller.assign_device_to_customer_using_post(customer_id=customer_id, device_id=device_id) - def save_edge(self, edge: Edge): - return self.edge_controller.save_edge_using_post(edge=edge) + def find_by_query_v1(self, body: DeviceSearchQuery): + return self.device_controller.find_by_query_using_post1(body=body) - def get_edge_info_by_id(self, edge_id: EdgeId): - edge_id = self.get_id(edge_id) - return self.edge_controller.get_edge_info_by_id_using_get(edge_id=edge_id) + def get_tenant_device_infos(self, page_size: str, page: str, type=None, device_profile_id=None, text_search=None, sort_property=None, sort_order=None): + 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) - def find_missing_to_related_rule_chains(self, edge_id: EdgeId): - edge_id = self.get_id(edge_id) - return self.edge_controller.find_missing_to_related_rule_chains_using_get(edge_id=edge_id) + def get_tenant_device(self, device_name: str): + return self.device_controller.get_tenant_device_using_get(device_name=device_name) - def sync_edge(self, edge_id: EdgeId): + def save_device(self, body: Device, access_token=None): + return self.device_controller.save_device_using_post(body=body, access_token=access_token) + + def assign_device_to_public_customer(self, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.device_controller.assign_device_to_public_customer_using_post(device_id=device_id) + + def get_device_types(self, ): + return self.device_controller.get_device_types_using_get() + + def unassign_device_from_customer(self, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.device_controller.unassign_device_from_customer_using_delete(device_id=device_id) + + def get_devices_by_ids(self, device_ids: list): + return self.device_controller.get_devices_by_ids_using_get(device_ids=device_ids) + + def get_customer_devices(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + customer_id = self.get_id(customer_id) + return self.device_controller.get_customer_devices_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 save_device_credentials(self, body: DeviceCredentials): + return self.device_controller.save_device_credentials_using_post(body=body) + + def get_tenant_entity_views(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.entity_view_controller.get_tenant_entity_views_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def find_by_query_v4(self, body: EntityViewSearchQuery): + return self.entity_view_controller.find_by_query_using_post4(body=body) + + def assign_entity_view_to_customer(self, customer_id: CustomerId, entity_view_id: EntityViewId): + customer_id = self.get_id(customer_id) + entity_view_id = self.get_id(entity_view_id) + return self.entity_view_controller.assign_entity_view_to_customer_using_post(customer_id=customer_id, entity_view_id=entity_view_id) + + def unassign_entity_view_from_edge(self, edge_id: EdgeId, entity_view_id: EntityViewId): edge_id = self.get_id(edge_id) - return self.edge_controller.sync_edge_using_post(edge_id=edge_id) + entity_view_id = self.get_id(entity_view_id) + return self.entity_view_controller.unassign_entity_view_from_edge_using_delete(edge_id=edge_id, entity_view_id=entity_view_id) - def get_edge_types(self): - return self.edge_controller.get_edge_types_using_get() + def get_entity_view_types(self, ): + return self.entity_view_controller.get_entity_view_types_using_get() - def delete_edge(self, edge_id: EdgeId): - return self.edge_controller.delete_edge_using_delete(edge_id=edge_id) + def get_entity_view_by_id(self, entity_view_id: EntityViewId): + entity_view_id = self.get_id(entity_view_id) + return self.entity_view_controller.get_entity_view_by_id_using_get(entity_view_id=entity_view_id) - def get_edge_by_id(self, edge_id: EdgeId): + def get_customer_entity_view_infos(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=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) + + def delete_entity_view(self, entity_view_id: EntityViewId): + entity_view_id = self.get_id(entity_view_id) + return self.entity_view_controller.delete_entity_view_using_delete(entity_view_id=entity_view_id) + + def save_entity_view(self, body: EntityView): + return self.entity_view_controller.save_entity_view_using_post(body=body) + + def get_tenant_entity_view(self, entity_view_name: str): + return self.entity_view_controller.get_tenant_entity_view_using_get(entity_view_name=entity_view_name) + + def get_customer_entity_views(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + customer_id = self.get_id(customer_id) + return self.entity_view_controller.get_customer_entity_views_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 assign_entity_view_to_public_customer(self, entity_view_id: EntityViewId): + entity_view_id = self.get_id(entity_view_id) + return self.entity_view_controller.assign_entity_view_to_public_customer_using_post(entity_view_id=entity_view_id) + + def get_edge_entity_views(self, edge_id: EdgeId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None): edge_id = self.get_id(edge_id) - return self.edge_controller.get_edge_by_id_using_get(edge_id=edge_id) + return self.entity_view_controller.get_edge_entity_views_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) - def set_root_rule_chain(self, edge_id: EdgeId, rule_chain_id: RuleChainId): + def unassign_entity_view_from_customer(self, entity_view_id: EntityViewId): + entity_view_id = self.get_id(entity_view_id) + return self.entity_view_controller.unassign_entity_view_from_customer_using_delete(entity_view_id=entity_view_id) + + def assign_entity_view_to_edge(self, edge_id: EdgeId, entity_view_id: EntityViewId): edge_id = self.get_id(edge_id) - rule_chain_id = self.get_id(rule_chain_id) - return self.edge_controller.set_root_rule_chain_using_post(edge_id=edge_id, rule_chain_id=rule_chain_id) + entity_view_id = self.get_id(entity_view_id) + return self.entity_view_controller.assign_entity_view_to_edge_using_post(edge_id=edge_id, entity_view_id=entity_view_id) - def find_by_query_edge(self, query): - return self.edge_controller.find_by_query_using_post2(query=query) + def get_entity_view_info_by_id(self, entity_view_id: EntityViewId): + 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 is_edges_support_enabled(self): - return self.edge_controller.is_edges_support_enabled_using_get() + def get_tenant_entity_view_infos(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.entity_view_controller.get_tenant_entity_view_infos_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_edges_by_ids(self, edge_ids): - return self.edge_controller.get_edges_by_ids_using_get(edge_ids=edge_ids) + def check_updates(self, ): + return self.admin_controller.check_updates_using_get() - def get_edges(self, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): - return self.edge_controller.get_edges_using_get(page_size=str(page_size), page=str(page), - text_search=text_search, sort_property=sort_property, - sort_order=sort_order) + def get_security_settings(self, ): + return self.admin_controller.get_security_settings_using_get() - def activate_instance(self, license_secret, release_date): - return self.edge_controller.activate_instance_using_post(license_secret=license_secret, - release_date=release_date) + def save_admin_settings(self, body: AdminSettings): + return self.admin_controller.save_admin_settings_using_post(body=body) - def check_instance(self, request): - return self.edge_controller.check_instance_using_post(request=request) + def send_test_sms(self, body: TestSmsRequest): + return self.admin_controller.send_test_sms_using_post(body=body) - def get_tenant_edge_infos(self, page_size: int, page: int, type=None, text_search=None, sort_property=None, - sort_order=None): - return self.edge_controller.get_tenant_edge_infos_using_get(page_size=str(page_size), page=str(page), type=type, - text_search=text_search, - sort_property=sort_property, sort_order=sort_order) + def send_test_mail(self, body: AdminSettings): + return self.admin_controller.send_test_mail_using_post(body=body) - def get_tenant_edge(self, edge_name: str): - return self.edge_controller.get_tenant_edge_using_get(edge_name=edge_name) + def save_security_settings(self, body: SecuritySettings): + return self.admin_controller.save_security_settings_using_post(body=body) + + def get_admin_settings(self, key: str): + return self.admin_controller.get_admin_settings_using_get(key=key) + + def sign_up(self, body: SignUpRequest): + return self.sign_up_controller.sign_up_using_post(body=body) + + def resend_email_activation(self, email: str): + return self.sign_up_controller.resend_email_activation_using_post(email=email) + + def activate_email(self, email_code: str): + return self.sign_up_controller.activate_email_using_get(email_code=email_code) + + def privacy_policy_accepted(self, ): + return self.sign_up_controller.privacy_policy_accepted_using_get() + + def activate_user_by_email_code(self, email_code: str): + return self.sign_up_controller.activate_user_by_email_code_using_post(email_code=email_code) + + def get_recaptcha_public_key(self, ): + return self.sign_up_controller.get_recaptcha_public_key_using_get() + + def accept_privacy_policy(self, ): + return self.sign_up_controller.accept_privacy_policy_using_post() + + def delete_tenant_account(self, ): + return self.sign_up_controller.delete_tenant_account_using_delete() - def get_tenant_edges(self, page_size: int, page: int, type=None, text_search=None, sort_property=None, - sort_order=None): - return self.edge_controller.get_tenant_edges_using_get(page_size=str(page_size), page=str(page), type=type, - text_search=text_search, - sort_property=sort_property, sort_order=sort_order) + def unassign_dashboard_from_public_customer(self, dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.unassign_dashboard_from_public_customer_using_delete(dashboard_id=dashboard_id) - """ Edge event endpoints""" + def get_dashboard_by_id(self, dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.get_dashboard_by_id_using_get(dashboard_id=dashboard_id) - def get_edge_events(self, edge_id: EdgeId, page_size: int, page: int, text_search=None, sort_property=None, - sort_order=None, start_time=None, end_time=None): + def get_edge_dashboards(self, edge_id: EdgeId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None): edge_id = self.get_id(edge_id) - return self.edge_event_controller.get_edge_events_using_get(edge_id=edge_id, page_size=str(page_size), - page=str(page), text_search=text_search, - sort_property=sort_property, sort_order=sort_order, - start_time=start_time, end_time=end_time) + return self.dashboard_controller.get_edge_dashboards_using_get(edge_id=edge_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) - """ Entity View endpoints """ + def set_tenant_home_dashboard_info(self, body: HomeDashboardInfo): + return self.dashboard_controller.set_tenant_home_dashboard_info_using_post(body=body) - def assign_entity_view_to_customer(self, customer_id: CustomerId, entity_view_id: EntityViewId): - return self.entity_view_controller.assign_entity_view_to_customer_using_post(customer_id=customer_id, - entity_view_id=entity_view_id) + def get_home_dashboard(self, ): + return self.dashboard_controller.get_home_dashboard_using_get() - def unassign_entity_view_from_customer(self, customer_id: CustomerId, entity_view_id: EntityViewId): - return self.entity_view_controller.unassign_entity_view_from_customer_using_delete(customer_id=customer_id, - entity_view_id=entity_view_id) + def add_dashboard_customers(self, body: list[str], dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.add_dashboard_customers_using_post(body=body, dashboard_id=dashboard_id) - def assign_entity_view_to_public_customer(self, entity_view_id: EntityViewId): - return self.entity_view_controller.assign_entity_view_to_public_customer_using_post( - entity_view_id=entity_view_id) - - def get_customer_entity_view_infos(self, customer_id: CustomerId, page_size: int, page: int, type=None, - text_search=None, sort_property=None, sort_order=None): - return self.entity_view_controller.get_customer_entity_view_infos_using_get(customer_id=customer_id, - page_size=str(page_size), - page=str(page), type=type, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) - - def unassign_entity_view_from_edge(self, edge_id: str, entity_view_id: EntityViewId): - return self.entity_view_controller.unassign_entity_view_from_edge_using_delete(edge_id=edge_id, - entity_view_id=entity_view_id) - - def assign_entity_view_to_edge(self, edge_id: str, entity_view_id: EntityViewId): - return self.entity_view_controller.assign_entity_view_to_edge_using_post(edge_id=edge_id, - entity_view_id=entity_view_id) - - def get_edge_entity_views(self, edge_id: str, page_size: int, page: int, type=None, text_search=None, - sort_property=None, sort_order=None, start_time=None, end_time=None): - return self.entity_view_controller.get_edge_entity_views_using_get(edge_id=edge_id, page_size=str(page_size), - page=str(page), type=type, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, start_time=start_time, - end_time=end_time) - - def save_entity_view(self, entity_view: EntityView): - return self.entity_view_controller.save_entity_view_using_post(entity_view=entity_view) + def get_tenant_dashboards_v1(self, tenant_id: TenantId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + tenant_id = self.get_id(tenant_id) + return self.dashboard_controller.get_tenant_dashboards_using_get1(tenant_id=tenant_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_entity_view_info_by_id(self, entity_view_id: EntityViewId): - return self.entity_view_controller.get_entity_view_info_by_id_using_get(entity_view_id=entity_view_id) + def assign_dashboard_to_customer(self, customer_id: CustomerId, dashboard_id: DashboardId): + customer_id = self.get_id(customer_id) + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.assign_dashboard_to_customer_using_post(customer_id=customer_id, dashboard_id=dashboard_id) + + def get_tenant_dashboards(self, page_size: str, page: str, mobile=None, text_search=None, sort_property=None, sort_order=None): + return self.dashboard_controller.get_tenant_dashboards_using_get(page_size=page_size, page=page, mobile=mobile, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def save_dashboard(self, body: Dashboard): + return self.dashboard_controller.save_dashboard_using_post(body=body) + + def get_home_dashboard_info(self, ): + return self.dashboard_controller.get_home_dashboard_info_using_get() - def get_tenant_entity_view_infos(self, page_size: int, page: int, type=None, text_search=None, sort_property=None, - sort_order=None): - return self.entity_view_controller.get_tenant_entity_view_infos_using_get(page_size=str(page_size), - page=str(page), type=type, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) + def get_max_datapoints_limit(self, ): + return self.dashboard_controller.get_max_datapoints_limit_using_get() - """ Lwm 2m endpoints """ + def update_dashboard_customers(self, dashboard_id: DashboardId, body=None): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.update_dashboard_customers_using_post(dashboard_id=dashboard_id, body=body) + + def get_dashboard_info_by_id(self, dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.get_dashboard_info_by_id_using_get(dashboard_id=dashboard_id) + + def delete_dashboard(self, dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.delete_dashboard_using_delete(dashboard_id=dashboard_id) + + def get_customer_dashboards(self, customer_id: CustomerId, page_size: str, page: str, mobile=None, text_search=None, sort_property=None, sort_order=None): + 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 remove_dashboard_customers(self, body: list[str], dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.remove_dashboard_customers_using_post(body=body, dashboard_id=dashboard_id) + + def unassign_dashboard_from_edge(self, edge_id: EdgeId, dashboard_id: DashboardId): + edge_id = self.get_id(edge_id) + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.unassign_dashboard_from_edge_using_delete(edge_id=edge_id, dashboard_id=dashboard_id) - def save_device_with_credentials(self, device_with_device_credentials): - return self.lwm_2m_controller.save_device_with_credentials_using_post( - device_with_device_credentials=device_with_device_credentials) + def assign_dashboard_to_edge(self, edge_id: EdgeId, dashboard_id: DashboardId): + edge_id = self.get_id(edge_id) + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.assign_dashboard_to_edge_using_post(edge_id=edge_id, dashboard_id=dashboard_id) + + def assign_dashboard_to_public_customer(self, dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.assign_dashboard_to_public_customer_using_post(dashboard_id=dashboard_id) + + def get_server_time(self, ): + return self.dashboard_controller.get_server_time_using_get() + + def get_tenant_home_dashboard_info(self, ): + return self.dashboard_controller.get_tenant_home_dashboard_info_using_get() + + def unassign_dashboard_from_customer(self, customer_id: CustomerId, dashboard_id: DashboardId): + customer_id = self.get_id(customer_id) + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.unassign_dashboard_from_customer_using_delete(customer_id=customer_id, dashboard_id=dashboard_id) def get_lwm2m_bootstrap_security_info(self, is_bootstrap_server: bool): - return self.lwm_2m_controller.get_lwm2m_bootstrap_security_info_using_get( - is_bootstrap_server=str(is_bootstrap_server)) + return self.lwm_2m_controller.get_lwm2m_bootstrap_security_info_using_get(is_bootstrap_server=is_bootstrap_server) - """ OTA package endpoints """ + def save_device_with_credentials(self, object=None): + return self.lwm_2m_controller.save_device_with_credentials_using_post(object=object) - def save_ota_package_info(self, ota_package_info: OtaPackageInfo): - return self.ota_package_controller.save_ota_package_info_using_post(ota_package_info=ota_package_info) + def get_tenants(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.tenant_controller.get_tenants_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_ota_package_info_by_id(self, ota_package_id: OtaPackageId): - 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 get_tenant_info_by_id(self, tenant_id: TenantId): + tenant_id = self.get_id(tenant_id) + return self.tenant_controller.get_tenant_info_by_id_using_get(tenant_id=tenant_id) - def delete_ota_package(self, ota_package_id: OtaPackageId): - 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) + def delete_tenant(self, tenant_id: TenantId): + tenant_id = self.get_id(tenant_id) + return self.tenant_controller.delete_tenant_using_delete(tenant_id=tenant_id) - def get_ota_package_by_id(self, ota_package_id: OtaPackageId): + def save_tenant(self, body: Tenant): + return self.tenant_controller.save_tenant_using_post(body=body) + + def get_tenant_infos(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.tenant_controller.get_tenant_infos_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_tenant_by_id(self, tenant_id: TenantId): + tenant_id = self.get_id(tenant_id) + return self.tenant_controller.get_tenant_by_id_using_get(tenant_id=tenant_id) + + def save_ota_package_data(self, file: str, checksum_algorithm: str, ota_package_id: OtaPackageId, checksum=None): ota_package_id = self.get_id(ota_package_id) - return self.ota_package_controller.get_ota_package_by_id_using_get(ota_package_id=ota_package_id) + return self.ota_package_controller.save_ota_package_data_using_post(file=file, checksum_algorithm=checksum_algorithm, ota_package_id=ota_package_id, checksum=checksum) + + def save_ota_package_info(self, body: SaveOtaPackageInfoRequest): + return self.ota_package_controller.save_ota_package_info_using_post(body=body) def download_ota_package(self, ota_package_id: OtaPackageId): ota_package_id = self.get_id(ota_package_id) return self.ota_package_controller.download_ota_package_using_get(ota_package_id=ota_package_id) - def save_ota_package_data(self, ota_package_id: OtaPackageId, checksum_algorithm: str, file: File, checksum=None): + def get_ota_package_info_by_id(self, ota_package_id: OtaPackageId): ota_package_id = self.get_id(ota_package_id) - return self.ota_package_controller.save_ota_package_data_using_post(ota_package_id=ota_package_id, - checksum_algorithm=checksum_algorithm, - file=file, checksum=checksum) - - def get_ota_packages(self, page_size: int, page: int, type=None, device_profile_id=None, text_search=None, - sort_property=None, sort_order=None): - if device_profile_id is not None and type is not None: - device_profile_id = self.get_id(device_profile_id) - return self.ota_package_controller.get_ota_packages_using_get(device_profile_id=device_profile_id, - type=type, - page_size=str(page_size), page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) - - return self.ota_package_controller.get_ota_packages_using_get1(page_size=str(page_size), page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) - - """ TB resource endpoints """ - - def save_resource(self, resource: Resource): - return self.tb_resource_controller.save_resource_using_post(resource=resource) - - def get_resource_info_by_id(self, resource_id: ResourceId): - resource_id = self.get_id(resource_id) - return self.tb_resource_controller.get_resource_info_by_id_using_get(resource_id=resource_id) - - def get_lwm2m_list_objects_page(self, page_size: int, page: int, text_search=None, sort_property=None, - sort_order=None): - return self.tb_resource_controller.get_lwm2m_list_objects_page_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) - - def get_lwm2m_list_objects(self, sort_order: str, sort_property: str, object_ids=None): - return self.tb_resource_controller.get_lwm2m_list_objects_page_using_get(sort_order=sort_order, - sort_property=sort_property, - object_ids=object_ids) - - def delete_resource(self, resource_id: ResourceId): - resource_id = self.get_id(resource_id) - return self.tb_resource_controller.delete_resource_using_delete1(resource_id=resource_id) - - def get_resource_by_id(self, resource_id: ResourceId): - resource_id = self.get_id(resource_id) - return self.tb_resource_controller.get_resource_by_id_using_get(resource_id=resource_id) - - def download_resource(self, resource_id: ResourceId): - resource_id = self.get_id(resource_id) - return self.tb_resource_controller.download_resource_using_get(resource_id=resource_id) - - def get_resources(self, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): - return self.tb_resource_controller.get_resources_using_get(page_size=str(page_size), page=str(page), - text_search=text_search, sort_property=sort_property, - sort_order=sort_order) - - """ RPC endpoints """ - - def get_persisted_rpc(self, rpc_id: str): - return self.rpc_controller.get_persisted_rpc_using_get(rpc_id=rpc_id) - - def delete_resource(self, rpc_id: str): - return self.rpc_controller.delete_resource_using_delete(rpc_id=rpc_id) - - def get_persisted_rpc_by_device(self, device_id: DeviceId, page_size: int, page: int, rpc_status: str, - text_search=None, sort_property=None, sort_order=None): - device_id = self.get_id(device_id) - return self.rpc_controller.get_persisted_rpc_by_device_using_get(device_id=device_id, page_size=str(page_size), - page=str(page), rpc_status=rpc_status, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) - - """ Rule chain endpoints """ + return self.ota_package_controller.get_ota_package_info_by_id_using_get(ota_package_id=ota_package_id) - def unassign_rule_chain_from_edge(self, edge_id: str, rule_chain_id: RuleChainId): - return self.rule_chain_controller.unassign_rule_chain_from_edge_using_delete(edge_id=edge_id, - rule_chain_id=rule_chain_id) + def delete_ota_package(self, ota_package_id: OtaPackageId): + 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) - def assign_rule_chain_to_edge(self, edge_id: str, rule_chain_id: RuleChainId): - return self.rule_chain_controller.assign_rule_chain_to_edge_using_post(edge_id=edge_id, - rule_chain_id=rule_chain_id) + def get_ota_package_by_id(self, ota_package_id: OtaPackageId): + ota_package_id = self.get_id(ota_package_id) + return self.ota_package_controller.get_ota_package_by_id_using_get(ota_package_id=ota_package_id) - def get_edge_rule_chains(self, edge_id: str, page_size: int, page: int, text_search=None, sort_property=None, - sort_order=None): - return self.rule_chain_controller.get_edge_rule_chains_using_get(edge_id=edge_id, page_size=str(page_size), - page=str(page), text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) + def get_ota_packages(self, device_profile_id: DeviceProfileId, type: str, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): + device_profile_id = self.get_id(device_profile_id) + return self.ota_package_controller.get_ota_packages_using_get(device_profile_id=device_profile_id, type=type, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_auto_assign_to_edge_rule_chains_using_get(self): - return self.rule_chain_controller.get_auto_assign_to_edge_rule_chains_using_get() + def get_ota_packages_v1(self, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): + return self.ota_package_controller.get_ota_packages_using_get1(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def unset_auto_assign_to_edge_rule_chain(self, rule_chain_id: RuleChainId): - return self.rule_chain_controller.unset_auto_assign_to_edge_rule_chain_using_delete(rule_chain_id=rule_chain_id) - def set_auto_assign_to_edge_rule_chain(self, rule_chain_id: RuleChainId): - return self.rule_chain_controller.set_auto_assign_to_edge_rule_chain_using_post(rule_chain_id=rule_chain_id) - def set_edge_template_root_rule_chain(self, rule_chain_id: RuleChainId): - return self.rule_chain_controller.set_edge_template_root_rule_chain_using_post(rule_chain_id=rule_chain_id) diff --git a/tb_rest_client/rest_client_pe.py b/tb_rest_client/rest_client_pe.py index c6be5ef1..f8619ec8 100644 --- a/tb_rest_client/rest_client_pe.py +++ b/tb_rest_client/rest_client_pe.py @@ -31,935 +31,1051 @@ def login(self, username, password): super(RestClientPE, self).login(username=username, password=password) self.__load_controllers() - """ Asset endpoints """ + def get_privacy_policy(self, ): + return self.self_registration_controller.get_privacy_policy_using_get() - def save_asset(self, asset: Asset, entity_group_id=None): - return self.asset_controller.save_asset_using_post(asset, entity_group_id=entity_group_id) + def get_self_registration_params(self, ): + return self.self_registration_controller.get_self_registration_params_using_get() - def get_user_assets(self, page_size: int, page: int, type=None, text_search=None, sort_property=None, - sort_order=None): - return self.asset_controller.get_user_assets_using_get(page_size=str(page_size), page=str(page), type=type, - text_search=text_search, sort_property=sort_property, - sort_order=sort_order) + def get_sign_up_self_registration_params(self, pkg_name=None): + return self.self_registration_controller.get_sign_up_self_registration_params_using_get(pkg_name=pkg_name) - """ Billing endpoints """ + def save_self_registration_params(self, body: SelfRegistrationParams): + return self.self_registration_controller.save_self_registration_params_using_post(body=body) - def send_account_activated_email(self, send_account_activated_email_request): - return self.billing_endpoint_controller.send_account_activated_email_using_post( - send_account_activated_email_request=send_account_activated_email_request) + def http_check_status_get(self, routing_key: str, request_params: dict, request_headers: dict): + return self.http_integration_controller.check_status_using_get(routing_key=routing_key, request_params=request_params, request_headers=request_headers) - def send_activation_email(self, send_activation_email_request): - return self.billing_endpoint_controller.send_activation_email_using_post( - send_activation_email_request=send_activation_email_request) + def http_process_request_v1_post1(self, routing_key: str, suffix: str): + return self.http_integration_controller.process_request_using_post1(routing_key=routing_key, suffix=suffix) - def send_password_was_reset_email(self, send_password_was_reset_email_request): - return self.billing_endpoint_controller.send_password_was_reset_email_using_post( - send_password_was_reset_email_request=send_password_was_reset_email_request) + def http_process_request_v2_post2(self, routing_key: str, suffix: str): + return self.http_integration_controller.process_request_using_post2(routing_key=routing_key, suffix=suffix) - def send_reset_password_email(self, send_reset_password_email_request): - return self.billing_endpoint_controller.send_reset_password_email_using_post( - send_reset_password_email_request=send_reset_password_email_request) + def get_asset_types(self, ): + return self.asset_controller.get_asset_types_using_get() - def tenant_has_billing_read(self): - return self.billing_endpoint_controller.tenant_has_billing_read_using_get() + def find_by_query(self, body: AssetSearchQuery): + return self.asset_controller.find_by_query_using_post(body=body) - def tenant_has_billing_write(self): - return self.billing_endpoint_controller.tenant_has_billing_write_using_get() + def get_tenant_assets(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + 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 check_tenant_can_update_plan(self, can_update_plan_request): - return self.billing_endpoint_controller.check_tenant_can_update_plan_using_post( - can_update_plan_request=can_update_plan_request) + def save_asset(self, body: Asset, entity_group_id=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 notify_tenant_plan_changed(self, tenant_plan_changed_request): - return self.billing_endpoint_controller.notify_tenant_plan_changed_using_post( - tenant_plan_changed_request=tenant_plan_changed_request) + def get_assets_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + entity_group_id = self.get_id(entity_group_id) + return self.asset_controller.get_assets_by_entity_group_id_using_get(entity_group_id=entity_group_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def notify_tenant_state_changed(self, tenant_state_changed_request): - return self.billing_endpoint_controller.notify_tenant_state_changed_using_post( - tenant_state_changed_request=tenant_state_changed_request) + def get_assets_by_ids(self, asset_ids: list): + return self.asset_controller.get_assets_by_ids_using_get(asset_ids=asset_ids) - """ Customer endpoints """ + def get_asset_by_id(self, asset_id: AssetId): + asset_id = self.get_id(asset_id) + return self.asset_controller.get_asset_by_id_using_get(asset_id=asset_id) - def save_customer(self, customer: Customer, entity_group_id=None): - return self.customer_controller.save_customer_using_post(customer=customer, entity_group_id=entity_group_id) + def delete_asset(self, asset_id: AssetId): + asset_id = self.get_id(asset_id) + return self.asset_controller.delete_asset_using_delete(asset_id=asset_id) - def get_customers_by_ids(self, customer_ids): - return self.customer_controller.getCustomersByIds(customer_ids=customer_ids) + def get_customer_assets(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + 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_customers_by_entity_group_id(self, entity_group_id, page_size: int, page: int, text_search=None, - sort_property=None, sort_order=None): - return self.customer_controller.get_customers_by_entity_group_id_using_get(entity_group_id=entity_group_id, - page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) + def get_tenant_asset(self, asset_name: str): + return self.asset_controller.get_tenant_asset_using_get(asset_name=asset_name) - def get_user_customers(self, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): - return self.customer_controller.get_user_customers_using_get(page_size=str(page_size), page=str(page), - text_search=text_search, - sort_property=sort_property, sort_order=sort_order) + def get_user_assets(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + 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) - """ Chirp stack integration endpoints """ + def delete_device_group_ota_package(self, id: str): + return self.device_group_ota_package_controller.delete_device_group_ota_package_using_delete(id=id) - def delete_chirp_stack_process_request(self, routing_key, msg, request_headers): - return self.chirp_stack_integration_controller.process_request_using_delete(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_firmware_by_id(self, group_id: EntityGroupId, firmware_type: str): + group_id = self.get_id(group_id) + return self.device_group_ota_package_controller.get_firmware_by_id_using_get(group_id=group_id, firmware_type=firmware_type) - def get_chirp_stack_process_request(self, routing_key, msg, request_headers): - return self.chirp_stack_integration_controller.process_request_using_get(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def save_device_group_ota_package(self, body: DeviceGroupOtaPackage): + return self.device_group_ota_package_controller.save_device_group_ota_package_using_post(body=body) - def head_chirp_stack_process_request(self, routing_key, msg, request_headers): - return self.chirp_stack_integration_controller.process_request_using_head(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def sync_edge(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.sync_edge_using_post(edge_id=edge_id) - def options_chirp_stack_process_request(self, routing_key, msg, request_headers): - return self.chirp_stack_integration_controller.process_request_using_options(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_edge_types(self, ): + return self.edge_controller.get_edge_types_using_get() - def patch_chirp_stack_process_request(self, routing_key, msg, request_headers): - return self.chirp_stack_integration_controller.process_request_using_patch(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def save_edge(self, body: Edge, entity_group_id=None): + entity_group_id = self.get_id(entity_group_id) + return self.edge_controller.save_edge_using_post(body=body, entity_group_id=entity_group_id) - def post_chirp_stack_process_request(self, routing_key, msg, request_headers): - return self.chirp_stack_integration_controller.process_request_using_post(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_customer_edges(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + customer_id = self.get_id(customer_id) + return self.edge_controller.get_customer_edges_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 put_chirp_stack_process_request(self, routing_key, msg, request_headers): - return self.chirp_stack_integration_controller.process_request_using_put(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def check_instance(self, body: object): + return self.edge_controller.check_instance_using_post(body=body) - """ Cloud endpoints """ + def is_edges_support_enabled(self, ): + return self.edge_controller.is_edges_support_enabled_using_get() - def tenant_has_white_label_read(self): - return self.cloud_endpoint_controller.tenant_has_white_label_read_using_get() + def get_edges_by_ids(self, edge_ids: list): + return self.edge_controller.get_edges_by_ids_using_get(edge_ids=edge_ids) - def tenant_has_white_label_write(self): - return self.cloud_endpoint_controller.tenant_has_white_label_write_using_get() + def find_missing_to_related_rule_chains(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.find_missing_to_related_rule_chains_using_get(edge_id=edge_id) - def tenant_white_labeling_allowed(self): - return self.cloud_endpoint_controller.tenant_white_labeling_allowed_using_get() + def get_tenant_edges(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.edge_controller.get_tenant_edges_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - """ Dashboard endpoints """ + def delete_edge(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.delete_edge_using_delete(edge_id=edge_id) - def get_user_dashboards(self, user_id: UserId, operation, page_size=10, page=0, text_search=None, - sort_property=None, sort_order=None, limit=100000): - user_id = self.get_id(user_id) - return self.dashboard_controller.get_user_dashboards_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit), - operation=operation, - user_id=user_id) - - def get_group_dashboards(self, entity_group_id: EntityGroupId, page_size=10, page=0, text_search=None, - sort_property=None, sort_order=None, limit=100000): - entity_group_id = self.get_id(entity_group_id) - return self.dashboard_controller.get_group_dashboards_using_get(entity_group_id=entity_group_id, - page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) - - def get_dasboards_by_ids(self, dashboards_ids): - if isinstance(dashboards_ids, list): - dashboards_ids = ",".join(dashboards_ids) - return self.dashboard_controller.get_dashboards_by_ids_using_get(dashboard_ids=dashboards_ids) - - def save_dashboard(self, dashboard: Dashboard, entity_group_id=None): - return self.dashboard_controller.save_dashboard_using_post(dashboard=dashboard, entity_group_id=entity_group_id) - - """ Tenant endpoints """ - - def get_tenants_by_ids(self, tenant_ids): - return self.tenant_controller.get_tenants_by_ids_using_get(tenant_ids=tenant_ids) + def find_by_query_v2(self, body: EdgeSearchQuery): + return self.edge_controller.find_by_query_using_post2(body=body) - """ Blob Entity endpoints""" + def get_edges_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + entity_group_id = self.get_id(entity_group_id) + return self.edge_controller.get_edges_by_entity_group_id_using_get(entity_group_id=entity_group_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_blob_entity_info_by_id(self, blob_entity_id: BlobEntityId): - blob_entity_id = self.get_id(blob_entity_id) - return self.blob_entity_controller.get_blob_entity_info_by_id_using_get(blob_entity_id=blob_entity_id) + def set_root_rule_chain(self, edge_id: EdgeId, rule_chain_id: RuleChainId): + edge_id = self.get_id(edge_id) + rule_chain_id = self.get_id(rule_chain_id) + return self.edge_controller.set_root_rule_chain_using_post(edge_id=edge_id, rule_chain_id=rule_chain_id) - def download_blob_entity(self, blob_entity_id: BlobEntityId): - blob_entity_id = self.get_id(blob_entity_id) - return self.blob_entity_controller.download_blob_entity_using_get(blob_entity_id=blob_entity_id) + def get_edge_by_id(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.edge_controller.get_edge_by_id_using_get(edge_id=edge_id) - def delete_blob_entity(self, blob_entity_id: BlobEntityId): - blob_entity_id = self.get_id(blob_entity_id) - self.blob_entity_controller.delete_blob_entity_using_delete(blob_entity_id=blob_entity_id) - - def get_blob_entities(self, type, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None, - start_time=None, end_time=None): - return self.blob_entity_controller.get_blob_entities_using_get(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) - - def get_blob_entities_by_ids(self, blob_entity_ids): - return self.blob_entity_controller.get_blob_entities_by_ids_using_get(blob_entity_ids=blob_entity_ids) + def get_user_edges(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.edge_controller.get_user_edges_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - """ Converter endpoints """ + def get_tenant_edge(self, edge_name: str): + return self.edge_controller.get_tenant_edge_using_get(edge_name=edge_name) - def get_converter_by_id(self, converter_id: ConverterId): - converter_id = self.get_id(converter_id) - return self.converter_controller.get_converter_by_id_using_get(converter_id=converter_id) + def get_edges(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.edge_controller.get_edges_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def save_converter(self, converter: Converter): - return self.converter_controller.save_converter_using_post(converter=converter) + def activate_instance(self, license_secret: str, release_date: str): + return self.edge_controller.activate_instance_using_post(license_secret=license_secret, release_date=release_date) - def get_converters(self, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None): - return self.converter_controller.get_converters_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) + def ocean_connect_process_request_v2_delete2(self, body: str, request_headers: dict, routing_key: str): + return self.ocean_connect_integration_controller.process_request_using_delete2(body=body, request_headers=request_headers, routing_key=routing_key) - def delete_converter(self, converter_id: ConverterId): - converter_id = self.get_id(converter_id) - self.converter_controller.delete_converter_using_delete(converter_id=converter_id) + def ocean_connect_process_request_v2_get2(self, body: str, request_headers: dict, routing_key: str): + return self.ocean_connect_integration_controller.process_request_using_get2(body=body, request_headers=request_headers, routing_key=routing_key) - def get_latest_converter_debug_input(self, converter_id: ConverterId): - converter_id = self.get_id(converter_id) - self.converter_controller.get_latest_converter_debug_input_using_get(converter_id=converter_id) + def ocean_connect_process_request_v2_head2(self, body: str, request_headers: dict, routing_key: str): + return self.ocean_connect_integration_controller.process_request_using_head2(body=body, request_headers=request_headers, routing_key=routing_key) - def test_up_link_converter(self, input_params): - return self.converter_controller.test_up_link_converter_using_post(input_params=input_params) + def ocean_connect_process_request_v2_options2(self, body: str, request_headers: dict, routing_key: str): + return self.ocean_connect_integration_controller.process_request_using_options2(body=body, request_headers=request_headers, routing_key=routing_key) - def test_downlink_converter(self, input_params): - return self.converter_controller.test_down_link_converter_using_post(input_params=input_params) + def ocean_connect_process_request_v2_patch2(self, body: str, request_headers: dict, routing_key: str): + return self.ocean_connect_integration_controller.process_request_using_patch2(body=body, request_headers=request_headers, routing_key=routing_key) - def get_converters_by_ids(self, converter_ids): - return self.converter_controller.get_converters_by_ids_using_get(converter_ids=converter_ids) + def ocean_connect_process_request_v10_post10(self, body: str, request_headers: dict, routing_key: str): + return self.ocean_connect_integration_controller.process_request_using_post10(body=body, request_headers=request_headers, routing_key=routing_key) - """ Custom menu endpoints""" + def ocean_connect_process_request_v2_put2(self, body: str, request_headers: dict, routing_key: str): + return self.ocean_connect_integration_controller.process_request_using_put2(body=body, request_headers=request_headers, routing_key=routing_key) - def get_custom_menu(self): - return self.custom_menu_controller.get_custom_menu_using_get() + def get_allowed_permissions(self, ): + return self.user_permissions_controller.get_allowed_permissions_using_get() - def get_current_custom_menu(self): - return self.custom_menu_controller.get_current_custom_menu_using_get() + def change_owner_to_customer(self, owner_id: UserId, entity_type: str, entity_id: EntityId): + owner_id = self.get_id(owner_id) + entity_id = self.get_id(entity_id) + return self.owner_controller.change_owner_to_customer_using_post(owner_id=owner_id, entity_type=entity_type, entity_id=entity_id) - def save_custom_menu(self, custom_menu: CustomMenu): - return self.custom_menu_controller.save_custom_menu_using_post(custom_menu=custom_menu) + def change_owner_to_tenant(self, owner_id: UserId, entity_type: str, entity_id: EntityId): + owner_id = self.get_id(owner_id) + entity_id = self.get_id(entity_id) + return self.owner_controller.change_owner_to_tenant_using_post(owner_id=owner_id, entity_type=entity_type, entity_id=entity_id) - """ Custom translations endpoints""" + def get_persisted_rpc(self, rpc_id: RpcId): + rpc_id = self.get_id(rpc_id) + return self.rpc_v_2_controller.get_persisted_rpc_using_get(rpc_id=rpc_id) - def get_custom_translation(self): - return self.custom_translation_controller.get_custom_translation_using_get() + def handle_two_way_device_rpc_request_v1(self, body: str, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.rpc_v_2_controller.handle_two_way_device_rpc_request_using_post1(body=body, device_id=device_id) - def get_current_custom_translation(self): - return self.custom_translation_controller.get_current_custom_translation_using_get() + def handle_one_way_device_rpc_request_v1(self, body: str, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.rpc_v_2_controller.handle_one_way_device_rpc_request_using_post1(body=body, device_id=device_id) - def save_custom_translation(self, custom_translation: CustomTranslation): - return self.custom_translation_controller.save_custom_translation_using_post( - custom_translation=custom_translation) + def delete_resource(self, rpc_id: RpcId): + rpc_id = self.get_id(rpc_id) + return self.rpc_v_2_controller.delete_resource_using_delete(rpc_id=rpc_id) - """ Entity group endpoints """ + def get_persisted_rpc_by_device(self, device_id: DeviceId, page_size: int, page: int, rpc_status: str, text_search=None, sort_property=None, sort_order=None): + device_id = self.get_id(device_id) + return self.rpc_v_2_controller.get_persisted_rpc_by_device_using_get(device_id=device_id, page_size=page_size, page=page, rpc_status=rpc_status, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_entity_group_by_id(self, entity_group_id: EntityGroupId): - 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_edge_events(self, edge_id: EdgeId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None): + edge_id = self.get_id(edge_id) + return self.edge_event_controller.get_edge_events_using_get(edge_id=edge_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) - def save_entity_group(self, entity_group: EntityGroup): - return self.entity_group_controller.save_entity_group_using_post(entity_group=entity_group) + def delete_customer(self, customer_id: CustomerId): + customer_id = self.get_id(customer_id) + return self.customer_controller.delete_customer_using_delete(customer_id=customer_id) - def delete_entity_group(self, entity_group_id: EntityGroupId): - entity_group_id = self.get_id(entity_group_id) - self.entity_group_controller.delete_entity_group_using_delete(entity_group_id=entity_group_id) + def get_customers_by_ids(self, customer_ids: list): + return self.customer_controller.get_customers_by_ids_using_get(customer_ids=customer_ids) - def get_entity_groups_by_type(self, group_type): - group_type = self.get_type(group_type) - return self.entity_group_controller.get_entity_groups_by_type_using_get(group_type=group_type) + def get_short_customer_info_by_id(self, customer_id: CustomerId): + customer_id = self.get_id(customer_id) + return self.customer_controller.get_short_customer_info_by_id_using_get(customer_id=customer_id) - def get_entity_groups_by_owner_and_type(self, owner_id, group_type): - group_type = self.get_type(group_type) - return self.entity_group_controller.get_entity_groups_by_owner_and_type_using_get( - owner_type=owner_id.entity_type, - owner_id=owner_id.id, - group_type=group_type) + def get_tenant_customer(self, customer_title: str): + return self.customer_controller.get_tenant_customer_using_get(customer_title=customer_title) - def get_entity_group_all_by_owner_and_type(self, owner_id, group_type): - group_type = self.get_type(group_type) - return self.entity_group_controller.get_entity_group_all_by_owner_and_type_using_get( - owner_type=owner_id.entity_type, - owner_id=owner_id.id, - group_type=group_type) + def get_customers(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.customer_controller.get_customers_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_entity_group_info_by_owner_and_name_and_type(self, owner_id, group_type, group_name): - group_type = self.get_type(group_type) - return self.entity_group_controller.get_enitity_group_by_owner_and_name_and_type_using_get( - owner_type=owner_id.entity_type, - owner_id=owner_id.id, - group_type=group_type, - group_name=group_name) + def get_customer_title_by_id(self, customer_id: CustomerId): + customer_id = self.get_id(customer_id) + return self.customer_controller.get_customer_title_by_id_using_get(customer_id=customer_id) - def add_entities_to_entity_group(self, entity_group_id: EntityGroupId, entity_ids): + def get_customers_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): entity_group_id = self.get_id(entity_group_id) - self.entity_group_controller.add_entities_to_entity_group_using_post(entity_group_id=entity_group_id, - str_entity_ids=entity_ids) + return self.customer_controller.get_customers_by_entity_group_id_using_get(entity_group_id=entity_group_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def remove_entities_from_entity_group(self, entity_group_id: EntityGroupId, entity_ids): - entity_group_id = self.get_id(entity_group_id) - self.entity_group_controller.remove_entities_from_entity_group_using_post(entity_group_id=entity_group_id, - str_entity_ids=entity_ids) + def get_customer_by_id(self, customer_id: CustomerId): + customer_id = self.get_id(customer_id) + return self.customer_controller.get_customer_by_id_using_get(customer_id=customer_id) - def get_group_entity(self, entity_group_id: EntityGroupId, entity_id): - entity_group_id = self.get_id(entity_group_id) - entity_id = self.get_id(entity_id) - return self.entity_group_controller.get_group_entity_using_get(entity_group_id=entity_group_id, - entity_id=entity_id) + def get_user_customers(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.customer_controller.get_user_customers_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_entities(self, entity_group_id: EntityGroupId, page_size=10, page=0, text_search=None, sort_property=None, - sort_order=None): + def save_customer(self, body: Customer, entity_group_id=None): entity_group_id = self.get_id(entity_group_id) - return self.entity_group_controller.get_entities_using_get(entity_group_id=entity_group_id, - page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) + return self.customer_controller.save_customer_using_post(body=body, entity_group_id=entity_group_id) - def get_entity_groups_for_entity(self, entity_id: EntityId): - entity_id = self.get_id(entity_id) - return self.get_entity_groups_for_entity(entity_id=entity_id) + def get_all_customer_users(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.user_controller.get_all_customer_users_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_entity_groups_by_ids(self, entity_group_ids): - return self.entity_group_controller.get_entity_groups_by_ids_using_get(entity_group_ids=entity_group_ids) + def get_users_by_ids(self, user_ids: list): + return self.user_controller.get_users_by_ids_using_get(user_ids=user_ids) - def get_owners(self, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None): - return self.entity_group_controller.get_owners_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) + def get_user_by_id(self, user_id: UserId): + user_id = self.get_id(user_id) + return self.user_controller.get_user_by_id_using_get(user_id=user_id) - def make_entity_group_public(self, entity_group_id: EntityGroupId): + def send_activation_email(self, email: str): + return self.user_controller.send_activation_email_using_post(email=email) + + def set_user_credentials_enabled(self, user_id: UserId, user_credentials_enabled=None): + user_id = self.get_id(user_id) + return self.user_controller.set_user_credentials_enabled_using_post(user_id=user_id, user_credentials_enabled=user_credentials_enabled) + + def get_customer_users(self, customer_id: CustomerId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + customer_id = self.get_id(customer_id) + return self.user_controller.get_customer_users_using_get(customer_id=customer_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_tenant_admins(self, tenant_id: TenantId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + tenant_id = self.get_id(tenant_id) + return self.user_controller.get_tenant_admins_using_get(tenant_id=tenant_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_user_token(self, user_id: UserId): + user_id = self.get_id(user_id) + return self.user_controller.get_user_token_using_get(user_id=user_id) + + def get_activation_link(self, user_id: UserId): + user_id = self.get_id(user_id) + return self.user_controller.get_activation_link_using_get(user_id=user_id) + + def get_user_users(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.user_controller.get_user_users_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_users_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): entity_group_id = self.get_id(entity_group_id) - self.entity_group_controller.make_entity_group_public_using_post(entity_group_id=entity_group_id) + return self.user_controller.get_users_by_entity_group_id_using_get(entity_group_id=entity_group_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def make_entity_group_private(self, entity_group_id: EntityGroupId): + def delete_user(self, user_id: UserId): + user_id = self.get_id(user_id) + return self.user_controller.delete_user_using_delete(user_id=user_id) + + def save_user(self, body: User, send_activation_mail=None, entity_group_id=None): entity_group_id = self.get_id(entity_group_id) - self.entity_group_controller.make_entity_group_private_using_post(entity_group_id=entity_group_id) + return self.user_controller.save_user_using_post(body=body, send_activation_mail=send_activation_mail, entity_group_id=entity_group_id) - def get_entity_group_by_owner_and_name_and_type(self, owner_id, group_type: str, group_name: str): - return self.entity_group_controller.get_entity_group_by_owner_and_name_and_type_using_get( - owner_type=owner_id.entity_type, owner_id=owner_id.id, group_type=group_type, group_name=group_name) + def is_user_token_access_enabled(self, ): + return self.user_controller.is_user_token_access_enabled_using_get() - """ Group permissions endpoints""" + def delete_group_permission(self, group_permission_id: GroupPermissionId): + group_permission_id = self.get_id(group_permission_id) + return self.group_permission_controller.delete_group_permission_using_delete(group_permission_id=group_permission_id) + + def get_entity_group_permissions(self, entity_group_id: EntityGroupId): + entity_group_id = self.get_id(entity_group_id) + return self.group_permission_controller.get_entity_group_permissions_using_get(entity_group_id=entity_group_id) def get_group_permission_by_id(self, group_permission_id: GroupPermissionId): group_permission_id = self.get_id(group_permission_id) - return self.group_permission_controller.get_group_permission_by_id_using_get( - group_permission_id=group_permission_id) + return self.group_permission_controller.get_group_permission_by_id_using_get(group_permission_id=group_permission_id) - def save_group_permission(self, group_permission: GroupPermission): - return self.group_permission_controller.save_group_permission_using_post(group_permission=group_permission) - - def delete_group_permission(self, group_permission_id: GroupPermissionId): + def get_group_permission_info_by_id(self, group_permission_id: GroupPermissionId, is_user_group: bool): group_permission_id = self.get_id(group_permission_id) - self.group_permission_controller.delete_group_permission_using_delete(group_permission_id=group_permission_id) + return self.group_permission_controller.get_group_permission_info_by_id_using_get(group_permission_id=group_permission_id, is_user_group=is_user_group) - def get_user_group_permissions(self, user_group_id): + def get_user_group_permissions(self, user_group_id: EntityId): user_group_id = self.get_id(user_group_id) return self.group_permission_controller.get_user_group_permissions_using_get(user_group_id=user_group_id) - def get_entity_group_permissions(self, entity_group_id: EntityGroupId): + def load_user_group_permission_infos(self, body: list[GroupPermission]): + return self.group_permission_controller.load_user_group_permission_infos_using_post(body=body) + + def save_group_permission(self, body: GroupPermission): + return self.group_permission_controller.save_group_permission_using_post(body=body) + + def delete_device(self, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.device_controller.delete_device_using_delete(device_id=device_id) + + def claim_device(self, device_name: str, body=None, sub_customer_id=None): + sub_customer_id = self.get_id(sub_customer_id) + return self.device_controller.claim_device_using_post(device_name=device_name, body=body, sub_customer_id=sub_customer_id) + + def count_by_device_profile_and_empty_ota_package(self, ota_package_type: str, device_profile_id: DeviceProfileId): + device_profile_id = self.get_id(device_profile_id) + return self.device_controller.count_by_device_profile_and_empty_ota_package_using_get(ota_package_type=ota_package_type, device_profile_id=device_profile_id) + + def assign_device_to_tenant(self, tenant_id: TenantId, device_id: DeviceId): + tenant_id = self.get_id(tenant_id) + device_id = self.get_id(device_id) + return self.device_controller.assign_device_to_tenant_using_post(tenant_id=tenant_id, device_id=device_id) + + def get_tenant_devices(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.device_controller.get_tenant_devices_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_user_devices(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.device_controller.get_user_devices_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def re_claim_device(self, device_name: str): + return self.device_controller.re_claim_device_using_delete(device_name=device_name) + + def get_device_credentials_by_device_id(self, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.device_controller.get_device_credentials_by_device_id_using_get(device_id=device_id) + + def get_device_by_id(self, device_id: DeviceId): + device_id = self.get_id(device_id) + return self.device_controller.get_device_by_id_using_get(device_id=device_id) + + def count_by_device_group_and_empty_ota_package(self, ota_package_type: str, ota_package_id: OtaPackageId, entity_group_id: EntityGroupId): + ota_package_id = self.get_id(ota_package_id) entity_group_id = self.get_id(entity_group_id) - return self.group_permission_controller.get_entity_group_permissions_using_get(entity_group_id=entity_group_id) + return self.device_controller.count_by_device_group_and_empty_ota_package_using_get(ota_package_type=ota_package_type, ota_package_id=ota_package_id, entity_group_id=entity_group_id) - def get_group_permission_info_by_id(self, group_permission_id: GroupPermissionId, is_user_group: bool): - group_permission_id = self.get_id(group_permission_id) - return self.group_permission_controller.get_group_permission_info_by_id_using_get( - group_permission_id=group_permission_id, is_user_group=is_user_group) + def find_by_query_v1(self, body: DeviceSearchQuery): + return self.device_controller.find_by_query_using_post1(body=body) - """ Integration endpoints. """ + def get_devices_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + entity_group_id = self.get_id(entity_group_id) + return self.device_controller.get_devices_by_entity_group_id_using_get(entity_group_id=entity_group_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_integration_by_id(self, integration_id: IntegrationId): - integration_id = self.get_id(integration_id) - return self.integration_controller.get_integration_by_id_using_get(integration_id=integration_id) + def get_tenant_device(self, device_name: str): + return self.device_controller.get_tenant_device_using_get(device_name=device_name) - def get_integration_by_routing_key(self, routing_key): - return self.integration_controller.get_integration_by_routing_key_using_get(routing_key=routing_key) + def save_device(self, body: Device, access_token=None, entity_group_id=None): + entity_group_id = self.get_id(entity_group_id) + return self.device_controller.save_device_using_post(body=body, access_token=access_token, entity_group_id=entity_group_id) - def save_integration(self, integration: Integration): - return self.integration_controller.save_integration_using_post(integration=integration) + def get_device_types(self, ): + return self.device_controller.get_device_types_using_get() - def check_integration_connection(self, integration: Integration): - return self.integration_controller.check_integration_connection_using_post(integration=integration) + def get_devices_by_ids(self, device_ids: list): + return self.device_controller.get_devices_by_ids_using_get(device_ids=device_ids) - def get_integrations(self, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None): - return self.integration_controller.get_integrations_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) + def get_customer_devices(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + customer_id = self.get_id(customer_id) + return self.device_controller.get_customer_devices_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 delete_integration(self, integration_id: IntegrationId): - integration_id = self.get_id(integration_id) - self.integration_controller.delete_integration_using_delete(integration_id=integration_id) + def save_device_credentials(self, body: DeviceCredentials): + return self.device_controller.save_device_credentials_using_post(body=body) - def get_integrations_by_ids(self, integration_ids): - return self.integration_controller.get_integrations_by_ids_using_get(integration_ids=integration_ids) + def delete_converter(self, converter_id: ConverterId): + converter_id = self.get_id(converter_id) + return self.converter_controller.delete_converter_using_delete(converter_id=converter_id) + + def get_converter_by_id(self, converter_id: ConverterId): + converter_id = self.get_id(converter_id) + return self.converter_controller.get_converter_by_id_using_get(converter_id=converter_id) + + def get_converters_by_ids(self, converter_ids: list): + return self.converter_controller.get_converters_by_ids_using_get(converter_ids=converter_ids) + + def get_converters(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.converter_controller.get_converters_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_latest_converter_debug_input(self, converter_id: ConverterId): + converter_id = self.get_id(converter_id) + return self.converter_controller.get_latest_converter_debug_input_using_get(converter_id=converter_id) + + def save_converter(self, body: Converter): + return self.converter_controller.save_converter_using_post(body=body) + + def test_down_link_converter(self, body: str): + return self.converter_controller.test_down_link_converter_using_post(body=body) + + def test_up_link_converter(self, body: str): + return self.converter_controller.test_up_link_converter_using_post(body=body) + + def get_tenant_entity_views(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.entity_view_controller.get_tenant_entity_views_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def find_by_query_v4(self, body: EntityViewSearchQuery): + return self.entity_view_controller.find_by_query_using_post4(body=body) + + def get_entity_views_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + entity_group_id = self.get_id(entity_group_id) + return self.entity_view_controller.get_entity_views_by_entity_group_id_using_get(entity_group_id=entity_group_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - """ Device endpoints """ - - def get_user_devices(self, device_type, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None, - limit=100000): - return self.device_controller.get_user_devices_using_get(type=device_type, - page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) - - """ Entity view endpoints """ - - def get_user_entity_views(self, entity_view_type, page_size=10, page=0, text_search=None, sort_property=None, - sort_order=None, limit=100000): - entity_view_type = self.get_type(entity_view_type) - return self.entity_view_controller.get_user_entity_views_using_get(type=entity_view_type, - page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) - - def get_entity_views_by_ids(self, entity_view_ids): + def get_entity_view_types(self, ): + return self.entity_view_controller.get_entity_view_types_using_get() + + def get_entity_view_by_id(self, entity_view_id: EntityViewId): + entity_view_id = self.get_id(entity_view_id) + return self.entity_view_controller.get_entity_view_by_id_using_get(entity_view_id=entity_view_id) + + def get_entity_views_by_ids(self, entity_view_ids: list): return self.entity_view_controller.get_entity_views_by_ids_using_get(entity_view_ids=entity_view_ids) - def save_entity_view(self, entity_view: EntityView, entity_group_id): - return self.entity_view_controller.save_entity_view_using_post(entity_view=entity_view, - entity_group_id=entity_group_id) + def delete_entity_view(self, entity_view_id: EntityViewId): + entity_view_id = self.get_id(entity_view_id) + return self.entity_view_controller.delete_entity_view_using_delete(entity_view_id=entity_view_id) + + def save_entity_view(self, body: EntityView, entity_group_id=None): + entity_group_id = self.get_id(entity_group_id) + return self.entity_view_controller.save_entity_view_using_post(body=body, entity_group_id=entity_group_id) - """ Owner endpoints""" + def get_tenant_entity_view(self, entity_view_name: str): + return self.entity_view_controller.get_tenant_entity_view_using_get(entity_view_name=entity_view_name) - def change_owner_to_tenant(self, owner_id, entity_id): - owner_id = self.get_id(owner_id) - entity_type = self.get_type(entity_id) + def get_customer_entity_views(self, customer_id: CustomerId, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + customer_id = self.get_id(customer_id) + return self.entity_view_controller.get_customer_entity_views_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_user_entity_views(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.entity_view_controller.get_user_entity_views_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def handle_rule_engine_request(self, body: str): + return self.rule_engine_controller.handle_rule_engine_request_using_post(body=body) + + def handle_rule_engine_request_v1(self, body: str, entity_type: str, entity_id: EntityId, timeout: int): entity_id = self.get_id(entity_id) - self.owner_controller.change_owner_to_tenant_using_post(owner_id=owner_id, entity_id=entity_id, - entity_type=entity_type) + return self.rule_engine_controller.handle_rule_engine_request_using_post1(body=body, entity_type=entity_type, entity_id=entity_id, timeout=timeout) - def change_owner_to_customer(self, owner_id, entity_id): - owner_id = self.get_id(owner_id) - entity_type = self.get_type(entity_id) + def handle_rule_engine_request_v2(self, body: str, entity_type: str, entity_id: EntityId): entity_id = self.get_id(entity_id) - self.owner_controller.change_owner_to_customer_using_post(owner_id=owner_id, entity_id=entity_id, - entity_type=entity_type) + return self.rule_engine_controller.handle_rule_engine_request_using_post2(body=body, entity_type=entity_type, entity_id=entity_id) - """ Reports endpoints """ + def check_updates(self, ): + return self.admin_controller.check_updates_using_get() - def download_dashboard_report(self, dashboard_id: DashboardId, report_params): - dashboard_id = self.get_id(dashboard_id) - return self.report_controller.download_dashboard_report_using_post(dashboard_id=dashboard_id, - report_params=report_params) + def get_security_settings(self, ): + return self.admin_controller.get_security_settings_using_get() - def download_test_report(self, report_config, reports_server_endpoint_url): - return self.report_controller.download_test_report_using_post(report_config=report_config, - reports_server_endpoint_url=reports_server_endpoint_url) + def save_admin_settings(self, body: AdminSettings): + return self.admin_controller.save_admin_settings_using_post(body=body) - """ Roles endpoints """ + def send_test_sms(self, body: TestSmsRequest): + return self.admin_controller.send_test_sms_using_post(body=body) - def get_role_by_id(self, role_id: RoleId): - role_id = self.get_id(role_id) - return self.role_controller.get_role_by_id_using_get(role_id=role_id) + def send_test_mail(self, body: AdminSettings): + return self.admin_controller.send_test_mail_using_post(body=body) - def save_role(self, role: Role): - return self.role_controller.save_role_using_post(role=role) + def save_security_settings(self, body: SecuritySettings): + return self.admin_controller.save_security_settings_using_post(body=body) - def delete_role(self, role_id: RoleId): - role_id = self.get_id(role_id) - self.role_controller.delete_role_using_delete(role_id=role_id) - - def get_roles(self, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None): - return self.role_controller.get_roles_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order) - - def get_roles_by_ids(self, roles_ids): - return self.role_controller.get_roles_by_ids_using_get(role_ids=roles_ids) - - def create_group_role(self, role_name, operations): - role = Role(type="GROUP", name=role_name, permissions=operations) - return self.save_role(role=role) - - """ User endpoints """ - - def get_all_customer_users(self, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None, - limit=100000): - return self.user_controller.get_all_customer_users_using_get(page_size=str(page_size), - page=str(page), - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) - - def get_user_users(self, page_size=10, page=0, text_search=None, sort_property=None, sort_order=None, limit=100000): - return self.user_controller.get_user_users_using_get(page_size=page_size, - page=page, - text_search=text_search, - sort_property=sort_property, - sort_order=sort_order, limit=str(limit)) - - def get_users_by_ids(self, user_ids): - return self.user_controller.get_users_by_ids_using_get(user_ids=user_ids) + def get_admin_settings(self, key: str, system_by_default=None): + return self.admin_controller.get_admin_settings_using_get(key=key, system_by_default=system_by_default) - def get_allowed_permissions(self): - return self.user_permissions_controller.get_allowed_permissions_using_get() + 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, routing_key=routing_key) - def save_user(self, user: User, send_activation_mail, entity_group_id=None): - return self.user_controller.save_user_using_post(user=user, send_activation_mail=send_activation_mail, - entity_group_id=entity_group_id) - - """ Rule engine endpoints""" - - def handle_rule_engine_request(self, request_body, entity_id=None, timeout=None): - if entity_id is None and timeout is None: - return self.rule_engine_controller.handle_rule_engine_request_using_post(request_body=request_body) - elif timeout is None: - entity_type = self.get_type(entity_id) - entity_id = self.get_type(entity_id) - return self.rule_engine_controller.handle_rule_engine_request_using_post2(entity_id=entity_id, - entity_type=entity_type, - request_body=request_body) - else: - entity_type = self.get_type(entity_id) - entity_id = self.get_type(entity_id) - return self.rule_engine_controller.handle_rule_engine_request_using_post1(entity_id=entity_id, - entity_type=entity_type, - request_body=request_body, - timeout=timeout) - - """ Scheduler endpoints """ + def t_mobile_iot_cdp_process_request_v4_get4(self, body: str, request_headers: dict, routing_key: str): + return self.t_mobile_iot_cdp_integration_controller.process_request_using_get4(body=body, request_headers=request_headers, routing_key=routing_key) - def get_scheduler_event_info_by_id(self, scheduler_event_id: SchedulerEventId): + def t_mobile_iot_cdp_process_request_v4_head4(self, body: str, request_headers: dict, routing_key: str): + return self.t_mobile_iot_cdp_integration_controller.process_request_using_head4(body=body, request_headers=request_headers, routing_key=routing_key) + + def t_mobile_iot_cdp_process_request_v4_options4(self, body: str, request_headers: dict, routing_key: str): + return self.t_mobile_iot_cdp_integration_controller.process_request_using_options4(body=body, request_headers=request_headers, routing_key=routing_key) + + def t_mobile_iot_cdp_process_request_v4_patch4(self, body: str, request_headers: dict, routing_key: str): + return self.t_mobile_iot_cdp_integration_controller.process_request_using_patch4(body=body, request_headers=request_headers, routing_key=routing_key) + + def t_mobile_iot_cdp_process_request_v12_post12(self, body: str, request_headers: dict, routing_key: str): + return self.t_mobile_iot_cdp_integration_controller.process_request_using_post12(body=body, request_headers=request_headers, routing_key=routing_key) + + def t_mobile_iot_cdp_process_request_v4_put4(self, body: str, request_headers: dict, routing_key: str): + return self.t_mobile_iot_cdp_integration_controller.process_request_using_put4(body=body, request_headers=request_headers, routing_key=routing_key) + + def sign_up(self, body: SignUpRequest): + return self.sign_up_controller.sign_up_using_post(body=body) + + def resend_email_activation(self, email: str, pkg_name=None): + return self.sign_up_controller.resend_email_activation_using_post(email=email, pkg_name=pkg_name) + + def activate_email(self, email_code: str, pkg_name=None): + return self.sign_up_controller.activate_email_using_get(email_code=email_code, pkg_name=pkg_name) + + def privacy_policy_accepted(self, ): + return self.sign_up_controller.privacy_policy_accepted_using_get() + + def set_not_display_welcome(self, ): + return self.sign_up_controller.set_not_display_welcome_using_post() + + def activate_user_by_email_code(self, email_code: str, pkg_name=None): + return self.sign_up_controller.activate_user_by_email_code_using_post(email_code=email_code, pkg_name=pkg_name) + + def get_recaptcha_public_key(self, ): + return self.sign_up_controller.get_recaptcha_public_key_using_get() + + def accept_privacy_policy(self, ): + return self.sign_up_controller.accept_privacy_policy_using_post() + + def is_display_welcome(self, ): + return self.sign_up_controller.is_display_welcome_using_get() + + def delete_tenant_account(self, ): + return self.sign_up_controller.delete_tenant_account_using_delete() + + def mobile_login(self, pkg_name: str): + return self.sign_up_controller.mobile_login_using_get(pkg_name=pkg_name) + + def delete_device_v1(self, ): + return self.trail_controller.delete_device_using_delete1() + + def thing_park_process_request_tpe_delete(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_tpe_using_delete(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_tpe_get(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_tpe_using_get(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_tpe_head(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_tpe_using_head(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_tpe_options(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_tpe_using_options(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_tpe_patch(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_tpe_using_patch(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_tpe_post(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_tpe_using_post(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_tpe_put(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_tpe_using_put(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_v5_delete5(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_using_delete5(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_v5_get5(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_using_get5(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_v5_head5(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_using_head5(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_v5_options5(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_using_options5(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_v5_patch5(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_using_patch5(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_v13_post13(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_using_post13(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def thing_park_process_request_v5_put5(self, body: str, request_headers: dict, all_request_params: dict, routing_key: str): + return self.thing_park_integration_controller.process_request_using_put5(body=body, request_headers=request_headers, all_request_params=all_request_params, routing_key=routing_key) + + def sig_fox_process_request_v3_delete3(self, body: str, request_headers: dict, routing_key: str): + return self.sig_fox_integration_controller.process_request_using_delete3(body=body, request_headers=request_headers, routing_key=routing_key) + + def sig_fox_process_request_v3_get3(self, body: str, request_headers: dict, routing_key: str): + return self.sig_fox_integration_controller.process_request_using_get3(body=body, request_headers=request_headers, routing_key=routing_key) + + def sig_fox_process_request_v3_head3(self, body: str, request_headers: dict, routing_key: str): + return self.sig_fox_integration_controller.process_request_using_head3(body=body, request_headers=request_headers, routing_key=routing_key) + + def sig_fox_process_request_v3_options3(self, body: str, request_headers: dict, routing_key: str): + return self.sig_fox_integration_controller.process_request_using_options3(body=body, request_headers=request_headers, routing_key=routing_key) + + def sig_fox_process_request_v3_patch3(self, body: str, request_headers: dict, routing_key: str): + return self.sig_fox_integration_controller.process_request_using_patch3(body=body, request_headers=request_headers, routing_key=routing_key) + + def sig_fox_process_request_v11_post11(self, body: str, request_headers: dict, routing_key: str): + return self.sig_fox_integration_controller.process_request_using_post11(body=body, request_headers=request_headers, routing_key=routing_key) + + def sig_fox_process_request_v3_put3(self, body: str, request_headers: dict, routing_key: str): + return self.sig_fox_integration_controller.process_request_using_put3(body=body, request_headers=request_headers, routing_key=routing_key) + + def assign_scheduler_event_to_edge(self, edge_id: EdgeId, scheduler_event_id: SchedulerEventId): + edge_id = self.get_id(edge_id) scheduler_event_id = self.get_id(scheduler_event_id) - return self.scheduler_event_controller.get_scheduler_event_info_by_id_using_get( - scheduler_event_id=scheduler_event_id) + return self.scheduler_event_controller.assign_scheduler_event_to_edge_using_post(edge_id=edge_id, scheduler_event_id=scheduler_event_id) - def get_scheduler_event_by_id(self, scheduler_event_id: SchedulerEventId): + def delete_scheduler_event(self, scheduler_event_id: SchedulerEventId): scheduler_event_id = self.get_id(scheduler_event_id) - return self.scheduler_event_controller.get_scheduler_event_by_id_using_get( - scheduler_event_id=scheduler_event_id) + return self.scheduler_event_controller.delete_scheduler_event_using_delete(scheduler_event_id=scheduler_event_id) - def save_scheduler_event(self, scheduler_event: SchedulerEvent): - return self.scheduler_event_controller.save_scheduler_event_using_post(scheduler_event=scheduler_event) + def get_all_scheduler_events(self, edge_id: EdgeId): + edge_id = self.get_id(edge_id) + return self.scheduler_event_controller.get_all_scheduler_events_using_get(edge_id=edge_id) - def delete_scheduler_event(self, scheduler_event_id: SchedulerEventId): + def get_edge_scheduler_events(self, edge_id: EdgeId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + edge_id = self.get_id(edge_id) + return self.scheduler_event_controller.get_edge_scheduler_events_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 get_scheduler_event_by_id(self, scheduler_event_id: SchedulerEventId): + scheduler_event_id = self.get_id(scheduler_event_id) + return self.scheduler_event_controller.get_scheduler_event_by_id_using_get(scheduler_event_id=scheduler_event_id) + + def get_scheduler_event_info_by_id(self, scheduler_event_id: SchedulerEventId): scheduler_event_id = self.get_id(scheduler_event_id) - self.scheduler_event_controller.delete_scheduler_event_using_delete(scheduler_event_id=scheduler_event_id) + return self.scheduler_event_controller.get_scheduler_event_info_by_id_using_get(scheduler_event_id=scheduler_event_id) - def get_scheduler_events(self, type): + def get_scheduler_events_by_ids(self, scheduler_event_ids: list): + return self.scheduler_event_controller.get_scheduler_events_by_ids_using_get(scheduler_event_ids=scheduler_event_ids) + + def get_scheduler_events(self, type=None): return self.scheduler_event_controller.get_scheduler_events_using_get(type=type) - def get_scheduler_events_by_ids(self, scheduler_event_ids): - return self.scheduler_event_controller.get_scheduler_events_by_ids_using_get( - scheduler_event_ids=scheduler_event_ids) + def save_scheduler_event(self, body: SchedulerEvent): + return self.scheduler_event_controller.save_scheduler_event_using_post(body=body) - """ Self registration endpoints. """ + def unassign_scheduler_event_from_edge(self, edge_id: EdgeId, scheduler_event_id: SchedulerEventId): + edge_id = self.get_id(edge_id) + scheduler_event_id = self.get_id(scheduler_event_id) + return self.scheduler_event_controller.unassign_scheduler_event_from_edge_using_delete(edge_id=edge_id, scheduler_event_id=scheduler_event_id) - def save_self_registration_params(self, self_registration_params: SelfRegistrationParams): - return self.self_registration_controller.save_self_registration_params_using_post( - self_registration_params=self_registration_params) + def download_dashboard_report(self, body: str, dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.report_controller.download_dashboard_report_using_post(body=body, dashboard_id=dashboard_id) - def get_self_registration_params(self): - return self.self_registration_controller.get_self_registration_params_using_get() + def download_test_report(self, body: ReportConfig, reports_server_endpoint_url=None): + return self.report_controller.download_test_report_using_post(body=body, reports_server_endpoint_url=reports_server_endpoint_url) - def get_sign_up_self_registration_params(self): - return self.self_registration_controller.get_sign_up_self_registration_params_using_get() + def get_dashboard_by_id(self, dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.get_dashboard_by_id_using_get(dashboard_id=dashboard_id) - def get_privacy_policy(self): - return self.self_registration_controller.get_privacy_policy_using_get() + def set_tenant_home_dashboard_info(self, body: HomeDashboardInfo): + return self.dashboard_controller.set_tenant_home_dashboard_info_using_post(body=body) - def get_terms_of_use(self): - return self.self_registration_controller.get_terms_of_use_using_get() + def get_home_dashboard(self, ): + return self.dashboard_controller.get_home_dashboard_using_get() - """ Sign up endpoints. """ + def get_tenant_dashboards_v1(self, tenant_id: TenantId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + tenant_id = self.get_id(tenant_id) + return self.dashboard_controller.get_tenant_dashboards_using_get1(tenant_id=tenant_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def sign_up(self, sign_up_request: SignUpRequest): - return self.sign_up_controller.sign_up_using_post(sign_up_request=sign_up_request) + def get_tenant_dashboards(self, page_size: str, page: str, mobile=None, text_search=None, sort_property=None, sort_order=None): + return self.dashboard_controller.get_tenant_dashboards_using_get(page_size=page_size, page=page, mobile=mobile, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def resend_email_activation(self, email: str): - return self.sign_up_controller.resend_email_activation_using_post(email=email) + def save_dashboard(self, body: Dashboard, entity_group_id=None): + entity_group_id = self.get_id(entity_group_id) + return self.dashboard_controller.save_dashboard_using_post(body=body, entity_group_id=entity_group_id) - def activate_email(self, email_code): - return self.sign_up_controller.activate_email_using_get(email_code=email_code) + def get_home_dashboard_info(self, ): + return self.dashboard_controller.get_home_dashboard_info_using_get() - def activate_user_by_email_code(self, email_code): - return self.sign_up_controller.activate_user_by_email_code_using_post(email_code=email_code) + def get_max_datapoints_limit(self, ): + return self.dashboard_controller.get_max_datapoints_limit_using_get() - def privacy_policy_accepted(self): - return self.sign_up_controller.privacy_policy_accepted_using_get() + def get_dashboard_info_by_id(self, dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.get_dashboard_info_by_id_using_get(dashboard_id=dashboard_id) - def accept_privacy_policy(self): - return self.sign_up_controller.accept_privacy_policy_using_post() + def delete_dashboard(self, dashboard_id: DashboardId): + dashboard_id = self.get_id(dashboard_id) + return self.dashboard_controller.delete_dashboard_using_delete(dashboard_id=dashboard_id) - """ HTTP integration endpoints """ + def get_customer_home_dashboard_info(self, ): + return self.dashboard_controller.get_customer_home_dashboard_info_using_get() - def process_http_request(self, routing_key, suffix, request_params, request_headers): - return self.http_integration_controller.process_request_using_post3(routing_key=routing_key, suffix=suffix, - request_params=request_params, - request_headers=request_headers) + def set_customer_home_dashboard_info(self, body: HomeDashboardInfo): + return self.dashboard_controller.set_customer_home_dashboard_info_using_post(body=body) - def check_http_status(self, routing_key, request_params, request_headers): - return self.http_integration_controller.check_status_using_get(routing_key=routing_key, - request_params=request_params, - request_headers=request_headers) + def get_dashboards_by_ids(self, dashboard_ids: list): + return self.dashboard_controller.get_dashboards_by_ids_using_get(dashboard_ids=dashboard_ids) - """ Loriot integration endpoints """ + def get_group_dashboards(self, entity_group_id: EntityGroupId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + entity_group_id = self.get_id(entity_group_id) + return self.dashboard_controller.get_group_dashboards_using_get(entity_group_id=entity_group_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def import_group_dashboards(self, body: list[Dashboard], entity_group_id: EntityGroupId, overwrite=None): + entity_group_id = self.get_id(entity_group_id) + return self.dashboard_controller.import_group_dashboards_using_post(body=body, entity_group_id=entity_group_id, overwrite=overwrite) - def delete_loriot_process_request(self, routing_key, msg, request_headers): - return self.loriot_integration_controller.process_request_using_delete1(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_user_dashboards(self, page_size: str, page: str, mobile=None, text_search=None, sort_property=None, sort_order=None, operation=None, user_id=None): + user_id = self.get_id(user_id) + return self.dashboard_controller.get_user_dashboards_using_get(page_size=page_size, page=page, mobile=mobile, text_search=text_search, sort_property=sort_property, sort_order=sort_order, operation=operation, user_id=user_id) - def get_loriot_process_request(self, routing_key, msg, request_headers): - return self.loriot_integration_controller.process_request_using_get1(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_server_time(self, ): + return self.dashboard_controller.get_server_time_using_get() - def head_loriot_process_request(self, routing_key, msg, request_headers): - return self.loriot_integration_controller.process_request_using_head1(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def export_group_dashboards(self, entity_group_id: EntityGroupId, limit: str): + entity_group_id = self.get_id(entity_group_id) + return self.dashboard_controller.export_group_dashboards_using_get(entity_group_id=entity_group_id, limit=limit) - def options_loriot_process_request(self, routing_key, msg, request_headers): - return self.loriot_integration_controller.process_request_using_options1(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_dashboards_by_entity_group_id(self, entity_group_id: EntityGroupId, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): + entity_group_id = self.get_id(entity_group_id) + return self.dashboard_controller.get_dashboards_by_entity_group_id_using_get(entity_group_id=entity_group_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def patch_loriot_process_request(self, routing_key, msg, request_headers): - return self.loriot_integration_controller.process_request_using_patch1(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_tenant_home_dashboard_info(self, ): + return self.dashboard_controller.get_tenant_home_dashboard_info_using_get() + + def _check_integration_connection_post(self, body: Integration): + return self.integration_controller.check_integration_connection_using_post(body=body) + + def _delete_integration_delete(self, integration_id: IntegrationId): + integration_id = self.get_id(integration_id) + return self.integration_controller.delete_integration_using_delete(integration_id=integration_id) + + def _get_integration_by_id_get(self, integration_id: IntegrationId): + integration_id = self.get_id(integration_id) + return self.integration_controller.get_integration_by_id_using_get(integration_id=integration_id) - def post_loriot_process_request(self, routing_key, msg, request_headers): - return self.loriot_integration_controller.process_request_using_post7(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def _get_integration_by_routing_key_get(self, routing_key: str): + return self.integration_controller.get_integration_by_routing_key_using_get(routing_key=routing_key) - def put_loriot_process_request(self, routing_key, msg, request_headers): - return self.loriot_integration_controller.process_request_using_put1(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def _get_integrations_by_ids_get(self, integration_ids: list): + return self.integration_controller.get_integrations_by_ids_using_get(integration_ids=integration_ids) - """ Ocean connect endpoints """ + def _get_integrations_get(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.integration_controller.get_integrations_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def post_ocean_connect_process_request(self, routing_key, msg, request_headers): - return self.ocean_connect_integration_controller.process_request_using_post4(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def _save_integration_post(self, body: Integration): + return self.integration_controller.save_integration_using_post(body=body) - def delete_ocean_connect_process_request(self, routing_key, msg, request_headers): - return self.ocean_connect_integration_controller.process_request_using_delete(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_current_custom_menu(self, ): + return self.custom_menu_controller.get_current_custom_menu_using_get() - def get_ocean_connect_process_request(self, routing_key, msg, request_headers): - return self.ocean_connect_integration_controller.process_request_using_get(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_custom_menu(self, ): + return self.custom_menu_controller.get_custom_menu_using_get() - def head_ocean_connect_process_request(self, routing_key, msg, request_headers): - return self.ocean_connect_integration_controller.process_request_using_head(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def save_custom_menu(self, body=None): + return self.custom_menu_controller.save_custom_menu_using_post(body=body) - def options_ocean_connect_process_request(self, routing_key, msg, request_headers): - return self.ocean_connect_integration_controller.process_request_using_options(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_lwm2m_bootstrap_security_info(self, is_bootstrap_server: bool): + return self.lwm_2m_controller.get_lwm2m_bootstrap_security_info_using_get(is_bootstrap_server=is_bootstrap_server) - def patch_ocean_connect_process_request(self, routing_key, msg, request_headers): - return self.ocean_connect_integration_controller.process_request_using_patch(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def save_device_with_credentials(self, entity_group_id=None, object=None): + entity_group_id = self.get_id(entity_group_id) + return self.lwm_2m_controller.save_device_with_credentials_using_post(entity_group_id=entity_group_id, object=object) - def put_ocean_connect_process_request(self, routing_key, msg, request_headers): - return self.ocean_connect_integration_controller.process_request_using_put(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_current_custom_translation(self, ): + return self.custom_translation_controller.get_current_custom_translation_using_get() - """ Sig fox integration endpoints """ + def get_custom_translation(self, ): + return self.custom_translation_controller.get_custom_translation_using_get() - def delete_sig_fox_process_request(self, routing_key, msg, request_headers): - return self.sigfox_integration_controller.process_request_using_delete1(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def save_custom_translation(self, body: CustomTranslation): + return self.custom_translation_controller.save_custom_translation_using_post(body=body) - def get_sig_fox_process_request(self, routing_key, msg, request_headers): - return self.sigfox_integration_controller.process_request_using_get1(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def delete_role(self, role_id: RoleId): + role_id = self.get_id(role_id) + return self.role_controller.delete_role_using_delete(role_id=role_id) - def head_sig_fox_process_request(self, routing_key, msg, request_headers): - return self.sigfox_integration_controller.process_request_using_head1(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_role_by_id(self, role_id: RoleId): + role_id = self.get_id(role_id) + return self.role_controller.get_role_by_id_using_get(role_id=role_id) - def options_sig_fox_process_request(self, routing_key, msg, request_headers): - return self.sigfox_integration_controller.process_request_using_options1(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_roles_by_ids(self, role_ids: list): + return self.role_controller.get_roles_by_ids_using_get(role_ids=role_ids) - def patch_sig_fox_process_request(self, routing_key, msg, request_headers): - return self.sigfox_integration_controller.process_request_using_patch1(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def get_roles(self, page_size: str, page: str, type=None, text_search=None, sort_property=None, sort_order=None): + return self.role_controller.get_roles_using_get(page_size=page_size, page=page, type=type, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def post_sig_fox_process_request(self, routing_key, msg, request_headers): - return self.sigfox_integration_controller.process_request_using_post5(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def save_role(self, body: Role): + return self.role_controller.save_role_using_post(body=body) - def put_sig_fox_process_request(self, routing_key, msg, request_headers): - return self.sigfox_integration_controller.process_request_using_put1(routing_key=routing_key, msg=msg, - request_headers=request_headers) + def delete_blob_entity(self, blob_entity_id: BlobEntityId): + blob_entity_id = self.get_id(blob_entity_id) + return self.blob_entity_controller.delete_blob_entity_using_delete(blob_entity_id=blob_entity_id) - """ T mobile iot cdp integration endpoints """ + def download_blob_entity(self, blob_entity_id: BlobEntityId): + blob_entity_id = self.get_id(blob_entity_id) + return self.blob_entity_controller.download_blob_entity_using_get(blob_entity_id=blob_entity_id) - def delete_t_mobile_iot_cdp_process_request(self, routing_key, msg, request_headers): - return self.tmobile_iot_cdp_integration_controller.process_request_using_delete2(routing_key=routing_key, - msg=msg, - request_headers=request_headers) + def get_blob_entities_by_ids(self, blob_entity_ids: list): + return self.blob_entity_controller.get_blob_entities_by_ids_using_get(blob_entity_ids=blob_entity_ids) - def get_t_mobile_iot_cdp_process_request(self, routing_key, msg, request_headers): - return self.tmobile_iot_cdp_integration_controller.process_request_using_get2(routing_key=routing_key, - msg=msg, - request_headers=request_headers) + def get_blob_entities(self, page_size: int, page: int, type=None, text_search=None, sort_property=None, sort_order=None, start_time=None, end_time=None): + return self.blob_entity_controller.get_blob_entities_using_get(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) - def head_t_mobile_iot_cdp_process_request(self, routing_key, msg, request_headers): - return self.tmobile_iot_cdp_integration_controller.process_request_using_head2(routing_key=routing_key, - msg=msg, - request_headers=request_headers) - - def options_t_mobile_iot_cdp_process_request(self, routing_key, msg, request_headers): - return self.tmobile_iot_cdp_integration_controller.process_request_using_options2(routing_key=routing_key, - msg=msg, - request_headers=request_headers) - - def patch_t_mobile_iot_cdp_process_request(self, routing_key, msg, request_headers): - return self.tmobile_iot_cdp_integration_controller.process_request_using_patch2(routing_key=routing_key, - msg=msg, - request_headers=request_headers) - - def post_t_mobile_iot_cdp_process_request(self, routing_key, msg, request_headers): - return self.tmobile_iot_cdp_integration_controller.process_request_using_post6(routing_key=routing_key, - msg=msg, - request_headers=request_headers) - - def put_t_mobile_iot_cdp_process_request(self, routing_key, msg, request_headers): - return self.tmobile_iot_cdp_integration_controller.process_request_using_put2(routing_key=routing_key, - msg=msg, - request_headers=request_headers) - - """ Solution endpoints """ - - def get_solution_template_details(self, solution_template_id: str): - return self.solution_controller.get_solution_template_details_using_get( - solution_template_id=solution_template_id) - - def get_solution_template_infos(self): - return self.solution_controller.get_solution_template_infos_using_get() - - def get_solution_template_instructions(self, solution_template_id: str): - return self.solution_controller.get_solution_template_instructions_using_get( - solution_template_id=solution_template_id) - - def delete_solution_template(self, solution_template_id): - return self.solution_controller.delete_solution_template_using_delete(solution_template_id=solution_template_id) - - def install_solution_template(self, solution_template_id): - return self.solution_controller.install_solution_template_using_post(solution_template_id=solution_template_id) - - """ Subscription endpoints """ - - def get_tenant_profile_data(self): - return self.subscription_controller.get_tenant_profile_data_using_get() - - def get_tenant_subscription_usage(self): - return self.subscription_controller.get_tenant_subscription_usage_using_get() - - def get_tenant_profile_data_by_id(self, tenant_profile_id: TenantProfileId): - tenant_profile_id = self.get_id(tenant_profile_id) - return self.subscription_controller.get_tenant_profile_data_by_id_using_get(tenant_profile_id=tenant_profile_id) - - """ Thing park integration endpoints """ - - def delete_thing_park_process_request(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_using_delete3(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def get_thing_park_process_request(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_using_get3(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def head_thing_park_process_request(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_using_head3(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def options_thing_park_process_request(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_using_options3(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def patch_thing_park_process_request(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_using_patch3(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def post_thing_park_process_request(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_using_post7(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def put_thing_park_process_request(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_using_put3(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def delete_thing_park_process_request_tpe(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_tpe_using_delete(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def get_thing_park_process_request_tpe(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_tpe_using_get(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def head_thing_park_process_request_tpe(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_tpe_using_head(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def options_thing_park_process_request_tpe(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_tpe_using_options(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def patch_thing_park_process_request_tpe(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_tpe_using_patch(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def post_thing_park_process_request_tpe(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_tpe_using_post(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - def put_thing_park_process_request_tpe(self, routing_key, all_request_params, msg, request_headers): - return self.thingpark_integration_controller.process_request_tpe_using_put(routing_key=routing_key, - all_request_params=all_request_params, - msg=msg, - request_headers=request_headers) - - """ White label endpoints. """ - - def get_white_label_params(self, logo_image_checksum, favicon_checksum): - return self.white_labeling_controller.get_white_label_params_using_get(logo_image_checksum=logo_image_checksum, - favicon_checksum=favicon_checksum) - - def get_login_white_label_params(self, logo_image_checksum, favicon_checksum): - return self.white_labeling_controller.get_login_white_label_params_using_get( - logo_image_checksum=logo_image_checksum, favicon_checksum=favicon_checksum) - - def get_current_white_label_params(self): - return self.white_labeling_controller.get_current_white_label_params_using_get() + def get_blob_entity_info_by_id(self, blob_entity_id: BlobEntityId): + blob_entity_id = self.get_id(blob_entity_id) + return self.blob_entity_controller.get_blob_entity_info_by_id_using_get(blob_entity_id=blob_entity_id) + + def loriot_process_request_v1_delete1(self, body: str, request_headers: dict, routing_key: str): + return self.loriot_integration_controller.process_request_using_delete1(body=body, request_headers=request_headers, routing_key=routing_key) + + def loriot_process_request_v1_get1(self, body: str, request_headers: dict, routing_key: str): + return self.loriot_integration_controller.process_request_using_get1(body=body, request_headers=request_headers, routing_key=routing_key) + + def loriot_process_request_v1_head1(self, body: str, request_headers: dict, routing_key: str): + return self.loriot_integration_controller.process_request_using_head1(body=body, request_headers=request_headers, routing_key=routing_key) + + def loriot_process_request_v1_options1(self, body: str, request_headers: dict, routing_key: str): + return self.loriot_integration_controller.process_request_using_options1(body=body, request_headers=request_headers, routing_key=routing_key) + + def loriot_process_request_v1_patch1(self, body: str, request_headers: dict, routing_key: str): + return self.loriot_integration_controller.process_request_using_patch1(body=body, request_headers=request_headers, routing_key=routing_key) + + def loriot_process_request_v9_post9(self, body: str, request_headers: dict, routing_key: str): + return self.loriot_integration_controller.process_request_using_post9(body=body, request_headers=request_headers, routing_key=routing_key) + + def loriot_process_request_v1_put1(self, body: str, request_headers: dict, routing_key: str): + return self.loriot_integration_controller.process_request_using_put1(body=body, request_headers=request_headers, routing_key=routing_key) + + def get_tenants(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.tenant_controller.get_tenants_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_tenant_info_by_id(self, tenant_id: TenantId): + tenant_id = self.get_id(tenant_id) + return self.tenant_controller.get_tenant_info_by_id_using_get(tenant_id=tenant_id) + + def delete_tenant(self, tenant_id: TenantId): + tenant_id = self.get_id(tenant_id) + return self.tenant_controller.delete_tenant_using_delete(tenant_id=tenant_id) + + def save_tenant(self, body: Tenant): + return self.tenant_controller.save_tenant_using_post(body=body) + + def get_tenants_by_ids(self, tenant_ids: list): + return self.tenant_controller.get_tenants_by_ids_using_get(tenant_ids=tenant_ids) + + def get_tenant_infos(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.tenant_controller.get_tenant_infos_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_tenant_by_id(self, tenant_id: TenantId): + tenant_id = self.get_id(tenant_id) + return self.tenant_controller.get_tenant_by_id_using_get(tenant_id=tenant_id) + + def chirp_stack_process_request_delete(self, body: str, request_headers: dict, routing_key: str): + return self.chirp_stack_integration_controller.process_request_using_delete(body=body, request_headers=request_headers, routing_key=routing_key) + + def chirp_stack_process_request_get(self, body: str, request_headers: dict, routing_key: str): + return self.chirp_stack_integration_controller.process_request_using_get(body=body, request_headers=request_headers, routing_key=routing_key) + + def chirp_stack_process_request_head(self, body: str, request_headers: dict, routing_key: str): + return self.chirp_stack_integration_controller.process_request_using_head(body=body, request_headers=request_headers, routing_key=routing_key) + + def chirp_stack_process_request_options(self, body: str, request_headers: dict, routing_key: str): + return self.chirp_stack_integration_controller.process_request_using_options(body=body, request_headers=request_headers, routing_key=routing_key) + + def chirp_stack_process_request_patch(self, body: str, request_headers: dict, routing_key: str): + return self.chirp_stack_integration_controller.process_request_using_patch(body=body, request_headers=request_headers, routing_key=routing_key) + + def chirp_stack_process_request_post(self, body: str, request_headers: dict, routing_key: str): + return self.chirp_stack_integration_controller.process_request_using_post(body=body, request_headers=request_headers, routing_key=routing_key) - def get_current_login_white_label_params(self): + def chirp_stack_process_request_put(self, body: str, request_headers: dict, routing_key: str): + return self.chirp_stack_integration_controller.process_request_using_put(body=body, request_headers=request_headers, routing_key=routing_key) + + def get_app_theme_css(self, body: PaletteSettings): + return self.white_labeling_controller.get_app_theme_css_using_post(body=body) + + def get_current_login_white_label_params(self, ): return self.white_labeling_controller.get_current_login_white_label_params_using_get() - def save_white_label_params(self, white_labeling_params: WhiteLabelingParams): - return self.white_labeling_controller.save_white_label_params_using_post( - white_labeling_params=white_labeling_params) + def get_current_white_label_params(self, ): + return self.white_labeling_controller.get_current_white_label_params_using_get() - def save_login_white_label_params(self, login_white_labeling_params: LoginWhiteLabelingParams): - return self.white_labeling_controller.save_login_white_label_params_using_post( - login_white_labeling_params=login_white_labeling_params) + def get_login_theme_css(self, body: PaletteSettings, dark_foreground=None): + return self.white_labeling_controller.get_login_theme_css_using_post(body=body, dark_foreground=dark_foreground) - def preview_white_label_params(self, white_labeling_params: WhiteLabelingParams): - return self.white_labeling_controller.preview_white_label_params_using_post( - white_labeling_params=white_labeling_params) + def get_login_white_label_params(self, logo_image_checksum=None, favicon_checksum=None): + return self.white_labeling_controller.get_login_white_label_params_using_get(logo_image_checksum=logo_image_checksum, favicon_checksum=favicon_checksum) - def is_white_labeling_allowed(self): - return self.white_labeling_controller.is_white_labeling_allowed_using_get() + def get_white_label_params(self, logo_image_checksum=None, favicon_checksum=None): + return self.white_labeling_controller.get_white_label_params_using_get(logo_image_checksum=logo_image_checksum, favicon_checksum=favicon_checksum) - def is_customer_white_labeling_allowed(self): + def is_customer_white_labeling_allowed(self, ): return self.white_labeling_controller.is_customer_white_labeling_allowed_using_get() - def get_login_theme_css(self, palette_settings: PaletteSettings, dark_foreground=None): - return self.white_labeling_controller.get_login_theme_css_using_post(palette_settings=palette_settings, - dark_foreground=dark_foreground) + def is_white_labeling_allowed(self, ): + return self.white_labeling_controller.is_white_labeling_allowed_using_get() + + def preview_white_label_params(self, body: WhiteLabelingParams): + return self.white_labeling_controller.preview_white_label_params_using_post(body=body) + + def save_login_white_label_params(self, body: LoginWhiteLabelingParams): + return self.white_labeling_controller.save_login_white_label_params_using_post(body=body) + + def save_white_label_params(self, body: WhiteLabelingParams): + return self.white_labeling_controller.save_white_label_params_using_post(body=body) + + def save_ota_package_data(self, file: str, checksum_algorithm: str, ota_package_id: OtaPackageId, checksum=None): + ota_package_id = self.get_id(ota_package_id) + return self.ota_package_controller.save_ota_package_data_using_post(file=file, checksum_algorithm=checksum_algorithm, ota_package_id=ota_package_id, checksum=checksum) + + def save_ota_package_info(self, body: SaveOtaPackageInfoRequest): + return self.ota_package_controller.save_ota_package_info_using_post(body=body) + + def download_ota_package(self, ota_package_id: OtaPackageId): + ota_package_id = self.get_id(ota_package_id) + return self.ota_package_controller.download_ota_package_using_get(ota_package_id=ota_package_id) + + def get_ota_package_info_by_id(self, ota_package_id: OtaPackageId): + 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 delete_ota_package(self, ota_package_id: OtaPackageId): + 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) + + def get_ota_package_by_id(self, ota_package_id: OtaPackageId): + ota_package_id = self.get_id(ota_package_id) + return self.ota_package_controller.get_ota_package_by_id_using_get(ota_package_id=ota_package_id) + + def get_group_ota_packages(self, group_id: EntityGroupId, type: str, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): + group_id = self.get_id(group_id) + return self.ota_package_controller.get_group_ota_packages_using_get(group_id=group_id, type=type, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_ota_packages(self, device_profile_id: DeviceProfileId, type: str, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): + device_profile_id = self.get_id(device_profile_id) + return self.ota_package_controller.get_ota_packages_using_get(device_profile_id=device_profile_id, type=type, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_ota_packages_v1(self, page_size: int, page: int, text_search=None, sort_property=None, sort_order=None): + return self.ota_package_controller.get_ota_packages_using_get1(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def add_entities_to_entity_group(self, body: list[str], entity_group_id: EntityGroupId): + entity_group_id = self.get_id(entity_group_id) + return self.entity_group_controller.add_entities_to_entity_group_using_post(body=body, entity_group_id=entity_group_id) + + def assign_entity_group_to_edge(self, edge_id: EdgeId, group_type: str, entity_group_id: EntityGroupId): + edge_id = self.get_id(edge_id) + entity_group_id = self.get_id(entity_group_id) + return self.entity_group_controller.assign_entity_group_to_edge_using_post(edge_id=edge_id, group_type=group_type, entity_group_id=entity_group_id) + + def delete_entity_group(self, entity_group_id: EntityGroupId): + entity_group_id = self.get_id(entity_group_id) + return self.entity_group_controller.delete_entity_group_using_delete(entity_group_id=entity_group_id) + + def get_all_edge_entity_groups(self, edge_id: EdgeId, group_type: str): + edge_id = self.get_id(edge_id) + return self.entity_group_controller.get_all_edge_entity_groups_using_get(edge_id=edge_id, group_type=group_type) + + def get_edge_entity_groups(self, edge_id: EdgeId, group_type: str, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + edge_id = self.get_id(edge_id) + return self.entity_group_controller.get_edge_entity_groups_using_get(edge_id=edge_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_entities(self, entity_group_id: EntityGroupId, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + entity_group_id = self.get_id(entity_group_id) + return self.entity_group_controller.get_entities_using_get(entity_group_id=entity_group_id, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def get_entity_group_all_by_owner_and_type(self, owner_type: str, owner_id: UserId, group_type: str): + owner_id = self.get_id(owner_id) + return self.entity_group_controller.get_entity_group_all_by_owner_and_type_using_get(owner_type=owner_type, owner_id=owner_id, group_type=group_type) + + def get_entity_group_by_id(self, entity_group_id: EntityGroupId): + 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, group_name: str): + 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): + return self.entity_group_controller.get_entity_groups_by_ids_using_get(entity_group_ids=entity_group_ids) + + def get_entity_groups_by_owner_and_type(self, owner_type: str, owner_id: UserId, group_type: str): + owner_id = self.get_id(owner_id) + return self.entity_group_controller.get_entity_groups_by_owner_and_type_using_get(owner_type=owner_type, owner_id=owner_id, group_type=group_type) + + def get_entity_groups_by_type(self, group_type: str): + return self.entity_group_controller.get_entity_groups_by_type_using_get(group_type=group_type) + + def get_entity_groups_for_entity(self, entity_type: str, entity_id: EntityId): + entity_id = self.get_id(entity_id) + return self.entity_group_controller.get_entity_groups_for_entity_using_get(entity_type=entity_type, entity_id=entity_id) + + def get_group_entity(self, entity_group_id: EntityGroupId, entity_id: EntityId): + entity_group_id = self.get_id(entity_group_id) + entity_id = self.get_id(entity_id) + return self.entity_group_controller.get_group_entity_using_get(entity_group_id=entity_group_id, entity_id=entity_id) + + def get_owners(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + return self.entity_group_controller.get_owners_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + + def make_entity_group_private(self, entity_group_id: EntityGroupId): + entity_group_id = self.get_id(entity_group_id) + return self.entity_group_controller.make_entity_group_private_using_post(entity_group_id=entity_group_id) + + def make_entity_group_public(self, entity_group_id: EntityGroupId): + entity_group_id = self.get_id(entity_group_id) + return self.entity_group_controller.make_entity_group_public_using_post(entity_group_id=entity_group_id) + + def remove_entities_from_entity_group(self, body: list[str], entity_group_id: EntityGroupId): + entity_group_id = self.get_id(entity_group_id) + return self.entity_group_controller.remove_entities_from_entity_group_using_post(body=body, entity_group_id=entity_group_id) + + def save_entity_group(self, body: EntityGroup): + return self.entity_group_controller.save_entity_group_using_post(body=body) + + def share_entity_group_to_child_owner_user_group(self, entity_group_id: EntityGroupId, user_group_id: EntityId, role_id: RoleId): + entity_group_id = self.get_id(entity_group_id) + user_group_id = self.get_id(user_group_id) + role_id = self.get_id(role_id) + return self.entity_group_controller.share_entity_group_to_child_owner_user_group_using_post(entity_group_id=entity_group_id, user_group_id=user_group_id, role_id=role_id) + + def share_entity_group(self, body: ShareGroupRequest, entity_group_id: EntityGroupId): + entity_group_id = self.get_id(entity_group_id) + return self.entity_group_controller.share_entity_group_using_post(body=body, entity_group_id=entity_group_id) + + def unassign_entity_group_from_edge(self, edge_id: EdgeId, group_type: str, entity_group_id: EntityGroupId): + edge_id = self.get_id(edge_id) + entity_group_id = self.get_id(entity_group_id) + return self.entity_group_controller.unassign_entity_group_from_edge_using_delete(edge_id=edge_id, group_type=group_type, entity_group_id=entity_group_id) - def get_app_theme_css(self, palette_settings: PaletteSettings): - return self.white_labeling_controller.get_app_theme_css_using_post(palette_settings=palette_settings) def __load_controllers(self): - self.auth_controller = AuthControllerApi(self.api_client) - self.admin_controller = AdminControllerApi(self.api_client) - self.alarm_controller = AlarmControllerApi(self.api_client) - self.asset_controller = AssetControllerApi(self.api_client) - self.audit_log_controller = AuditLogControllerApi(self.api_client) - self.blob_entity_controller = BlobEntityControllerApi(self.api_client) - self.component_descriptor_controller = ComponentDescriptorControllerApi(self.api_client) + self.http_integration_controller = HttpIntegrationControllerApi(self.api_client) + self.user_permissions_controller = UserPermissionsControllerApi(self.api_client) + self.device_group_ota_package_controller = DeviceGroupOtaPackageControllerApi(self.api_client) self.converter_controller = ConverterControllerApi(self.api_client) - self.custom_menu_controller = CustomMenuControllerApi(self.api_client) - self.custom_translation_controller = CustomTranslationControllerApi(self.api_client) + self.t_mobile_iot_cdp_integration_controller = TMobileIotCdpIntegrationControllerApi(self.api_client) self.customer_controller = CustomerControllerApi(self.api_client) - self.chirp_stack_integration_controller = ChirpStackIntegrationControllerApi(self.api_client) - self.cloud_endpoint_controller = CloudEndpointControllerApi(self.api_client) - self.dashboard_controller = DashboardControllerApi(self.api_client) - self.device_controller = DeviceControllerApi(self.api_client) - self.device_profile_controller = DeviceProfileControllerApi(self.api_client) - self.edge_controller = EdgeControllerApi(self.api_client) - self.edge_event_controller = EdgeEventControllerApi(self.api_client) + self.role_controller = RoleControllerApi(self.api_client) self.entity_group_controller = EntityGroupControllerApi(self.api_client) - self.entity_relation_controller = EntityRelationControllerApi(self.api_client) + self.admin_controller = AdminControllerApi(self.api_client) + self.edge_controller = EdgeControllerApi(self.api_client) + 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.entity_query_controller = EntityQueryControllerApi(self.api_client) - self.event_controller = EventControllerApi(self.api_client) - self.group_permission_controller = GroupPermissionControllerApi(self.api_client) - self.queue_controller = QueueControllerApi(self.api_client) - self.integration_controller = IntegrationControllerApi(self.api_client) - self.role_controller = RoleControllerApi(self.api_client) - self.rpc_controller = RpcControllerApi(self.api_client) + self.rpc_v2_controller = RpcV2ControllerApi(self.api_client) + self.lwm2m_controller = Lwm2mControllerApi(self.api_client) self.scheduler_event_controller = SchedulerEventControllerApi(self.api_client) - self.self_registration_controller = SelfRegistrationControllerApi(self.api_client) - self.sigfox_integration_controller = SigFoxIntegrationControllerApi(self.api_client) - self.sign_up_controller = SignUpControllerApi(self.api_client) - self.http_integration_controller = HttpIntegrationControllerApi(self.api_client) - self.lwm_2m_controller = Lwm2mControllerApi(self.api_client) - self.loriot_integration_controller = LoriotIntegrationControllerApi(self.api_client) - self.owner_controller = OwnerControllerApi(self.api_client) - self.ocean_connect_integration_controller = OceanConnectIntegrationControllerApi(self.api_client) - self.report_controller = ReportControllerApi(self.api_client) + self.custom_menu_controller = CustomMenuControllerApi(self.api_client) + self.thing_park_integration_controller = ThingParkIntegrationControllerApi(self.api_client) self.rule_engine_controller = RuleEngineControllerApi(self.api_client) + self.ocean_connect_integration_controller = OceanConnectIntegrationControllerApi(self.api_client) + self.integration_controller = IntegrationControllerApi(self.api_client) + self.custom_translation_controller = CustomTranslationControllerApi(self.api_client) self.ota_package_controller = OtaPackageControllerApi(self.api_client) - self.tb_resource_controller = TbResourceControllerApi(self.api_client) - self.rule_chain_controller = RuleChainControllerApi(self.api_client) - self.telemetry_controller = TelemetryControllerApi(self.api_client) - self.tenant_controller = TenantControllerApi(self.api_client) - self.tenant_profile_controller = TenantProfileControllerApi(self.api_client) - self.tmobile_iot_cdp_integration_controller = TMobileIotCdpIntegrationControllerApi(self.api_client) - self.thingpark_integration_controller = ThingParkIntegrationControllerApi(self.api_client) - self.user_permissions_controller = UserPermissionsControllerApi(self.api_client) + self.edge_event_controller = EdgeEventControllerApi(self.api_client) + self.device_controller = DeviceControllerApi(self.api_client) + self.group_permission_controller = GroupPermissionControllerApi(self.api_client) + self.chirp_stack_integration_controller = ChirpStackIntegrationControllerApi(self.api_client) self.user_controller = UserControllerApi(self.api_client) - self.solution_controller = SolutionControllerApi(self.api_client) - self.subscription_controller = SubscriptionControllerApi(self.api_client) - self.billing_endpoint_controller = BillingEndpointControllerApi(self.api_client) - self.widget_type_controller = WidgetTypeControllerApi(self.api_client) - self.widgets_bundle_controller = WidgetsBundleControllerApi(self.api_client) self.white_labeling_controller = WhiteLabelingControllerApi(self.api_client) + self.sign_up_controller = SignUpControllerApi(self.api_client) + self.blob_entity_controller = BlobEntityControllerApi(self.api_client) + self.owner_controller = OwnerControllerApi(self.api_client) + self.self_registration_controller = SelfRegistrationControllerApi(self.api_client) + self.sig_fox_integration_controller = SigFoxIntegrationControllerApi(self.api_client) + self.asset_controller = AssetControllerApi(self.api_client) - @staticmethod - def get_type(type): - return type.entity_type if hasattr(type, "entity_type") else type - - @staticmethod - def get_id(id): - return id.id if hasattr(id, "id") else id From 9c77fee0f423d85def0df8d60ee3913aefec037c Mon Sep 17 00:00:00 2001 From: samson0v Date: Fri, 20 Aug 2021 13:57:03 +0300 Subject: [PATCH 2/2] Fixed models --- .../api/api_ce/device_api_controller_api.py | 846 ------------------ .../api/api_ce/entity_query_controller.py | 451 ---------- .../api/api_ce/rpc_controller_api.py | 577 ------------ .../api/api_pe/alarm_controller_api.py | 188 ---- .../api/api_pe/audit_log_controller_api.py | 565 ------------ .../api/api_pe/event_controller_api.py | 331 ------- .../api/api_pe/rule_chain_controller_api.py | 146 --- .../api_pe/widgets_bundle_controller_api.py | 146 --- .../models/models_ce/admin_settings_id.py | 18 +- tb_rest_client/models/models_ce/alarm_id.py | 17 +- tb_rest_client/models/models_ce/asset_id.py | 18 +- .../models/models_ce/audit_log_id.py | 18 +- .../models/models_ce/blob_entity_id.py | 148 --- .../models_ce/component_descriptor_id.py | 18 +- .../models/models_ce/converter_id.py | 148 --- .../models/models_ce/customer_id.py | 18 +- .../models/models_ce/dashboard_id.py | 18 +- .../models/models_ce/device_credentials_id.py | 18 +- tb_rest_client/models/models_ce/device_id.py | 19 +- .../models/models_ce/device_profile_id.py | 18 +- .../models/models_ce/edge_event_id.py | 18 +- tb_rest_client/models/models_ce/edge_id.py | 18 +- .../models/models_ce/entity_group_id.py | 148 --- .../models/models_ce/entity_type_filter.py | 151 ---- .../models/models_ce/group_permission_id.py | 148 --- .../models/models_ce/integration_id.py | 148 --- .../models_ce/o_auth2_integration_id.py | 116 --- tb_rest_client/models/models_ce/role_id.py | 148 --- .../models/models_ce/scheduler_event_id.py | 148 --- tb_rest_client/models/models_ce/tenant_id.py | 18 +- .../models/models_ce/tenant_profile_id.py | 18 +- .../models/models_ce/text_page_data_asset.py | 168 ---- .../models_ce/text_page_data_customer.py | 168 ---- .../text_page_data_dashboard_info.py | 168 ---- .../models/models_ce/text_page_data_device.py | 168 ---- .../models_ce/text_page_data_entity_view.py | 168 ---- .../models_ce/text_page_data_rule_chain.py | 168 ---- .../models/models_ce/text_page_data_tenant.py | 168 ---- .../models/models_ce/text_page_data_user.py | 168 ---- .../text_page_data_widgets_bundle.py | 168 ---- .../models/models_ce/text_page_link.py | 220 ----- .../models_ce/time_page_data_alarm_info.py | 168 ---- .../models_ce/time_page_data_audit_log.py | 168 ---- .../time_page_data_dashboard_info.py | 168 ---- .../models/models_ce/time_page_data_event.py | 168 ---- .../models/models_ce/time_page_link.py | 220 ----- tb_rest_client/models/models_ce/user_id.py | 18 +- tb_rest_client/models/models_pe/asset_id.py | 18 +- .../models/models_pe/blob_entity_id.py | 18 +- .../models/models_pe/converter_id.py | 18 +- .../models/models_pe/device_profile.py | 457 ---------- .../models/models_pe/entity_group_id.py | 18 +- .../models/models_pe/entity_type_filter.py | 151 ---- tb_rest_client/models/models_pe/file.py | 480 ---------- .../models/models_pe/input_stream.py | 88 -- .../models/models_pe/integration_id.py | 18 +- .../models/models_pe/page_data_alarm_info.py | 194 ---- .../models/models_pe/page_data_asset.py | 194 ---- .../models/models_pe/page_data_audit_log.py | 194 ---- .../models/models_pe/page_data_customer.py | 194 ---- .../models_pe/page_data_dashboard_info.py | 194 ---- .../models/models_pe/page_data_device.py | 194 ---- .../models/models_pe/page_data_entity_view.py | 194 ---- .../models/models_pe/page_data_event.py | 194 ---- .../models/models_pe/page_data_rule_chain.py | 194 ---- .../models/models_pe/page_data_tenant.py | 194 ---- .../models/models_pe/page_data_user.py | 194 ---- .../models_pe/page_data_widgets_bundle.py | 194 ---- tb_rest_client/models/models_pe/resource.py | 298 ------ .../models/models_pe/scheduler_event_id.py | 18 +- .../models/models_pe/tenant_profile.py | 303 ------- .../models_pe/tenant_profile_configuration.py | 93 -- .../models/models_pe/tenant_profile_data.py | 121 --- .../models/models_pe/tenant_profile_id.py | 121 --- tb_rest_client/models/models_pe/uri.py | 532 ----------- tb_rest_client/models/models_pe/url.py | 376 -------- tb_rest_client/models/models_pe/user_id.py | 17 +- tb_rest_client/rest_client_pe.py | 14 +- 78 files changed, 120 insertions(+), 12814 deletions(-) delete mode 100644 tb_rest_client/api/api_ce/device_api_controller_api.py delete mode 100644 tb_rest_client/api/api_ce/entity_query_controller.py delete mode 100644 tb_rest_client/api/api_ce/rpc_controller_api.py delete mode 100644 tb_rest_client/api/api_pe/alarm_controller_api.py delete mode 100644 tb_rest_client/api/api_pe/audit_log_controller_api.py delete mode 100644 tb_rest_client/api/api_pe/event_controller_api.py delete mode 100644 tb_rest_client/api/api_pe/rule_chain_controller_api.py delete mode 100644 tb_rest_client/api/api_pe/widgets_bundle_controller_api.py delete mode 100644 tb_rest_client/models/models_ce/blob_entity_id.py delete mode 100644 tb_rest_client/models/models_ce/converter_id.py delete mode 100644 tb_rest_client/models/models_ce/entity_group_id.py delete mode 100644 tb_rest_client/models/models_ce/entity_type_filter.py delete mode 100644 tb_rest_client/models/models_ce/group_permission_id.py delete mode 100644 tb_rest_client/models/models_ce/integration_id.py delete mode 100644 tb_rest_client/models/models_ce/o_auth2_integration_id.py delete mode 100644 tb_rest_client/models/models_ce/role_id.py delete mode 100644 tb_rest_client/models/models_ce/scheduler_event_id.py delete mode 100644 tb_rest_client/models/models_ce/text_page_data_asset.py delete mode 100644 tb_rest_client/models/models_ce/text_page_data_customer.py delete mode 100644 tb_rest_client/models/models_ce/text_page_data_dashboard_info.py delete mode 100644 tb_rest_client/models/models_ce/text_page_data_device.py delete mode 100644 tb_rest_client/models/models_ce/text_page_data_entity_view.py delete mode 100644 tb_rest_client/models/models_ce/text_page_data_rule_chain.py delete mode 100644 tb_rest_client/models/models_ce/text_page_data_tenant.py delete mode 100644 tb_rest_client/models/models_ce/text_page_data_user.py delete mode 100644 tb_rest_client/models/models_ce/text_page_data_widgets_bundle.py delete mode 100644 tb_rest_client/models/models_ce/text_page_link.py delete mode 100644 tb_rest_client/models/models_ce/time_page_data_alarm_info.py delete mode 100644 tb_rest_client/models/models_ce/time_page_data_audit_log.py delete mode 100644 tb_rest_client/models/models_ce/time_page_data_dashboard_info.py delete mode 100644 tb_rest_client/models/models_ce/time_page_data_event.py delete mode 100644 tb_rest_client/models/models_ce/time_page_link.py delete mode 100644 tb_rest_client/models/models_pe/device_profile.py delete mode 100644 tb_rest_client/models/models_pe/entity_type_filter.py delete mode 100644 tb_rest_client/models/models_pe/file.py delete mode 100644 tb_rest_client/models/models_pe/input_stream.py delete mode 100644 tb_rest_client/models/models_pe/page_data_alarm_info.py delete mode 100644 tb_rest_client/models/models_pe/page_data_asset.py delete mode 100644 tb_rest_client/models/models_pe/page_data_audit_log.py delete mode 100644 tb_rest_client/models/models_pe/page_data_customer.py delete mode 100644 tb_rest_client/models/models_pe/page_data_dashboard_info.py delete mode 100644 tb_rest_client/models/models_pe/page_data_device.py delete mode 100644 tb_rest_client/models/models_pe/page_data_entity_view.py delete mode 100644 tb_rest_client/models/models_pe/page_data_event.py delete mode 100644 tb_rest_client/models/models_pe/page_data_rule_chain.py delete mode 100644 tb_rest_client/models/models_pe/page_data_tenant.py delete mode 100644 tb_rest_client/models/models_pe/page_data_user.py delete mode 100644 tb_rest_client/models/models_pe/page_data_widgets_bundle.py delete mode 100644 tb_rest_client/models/models_pe/resource.py delete mode 100644 tb_rest_client/models/models_pe/tenant_profile.py delete mode 100644 tb_rest_client/models/models_pe/tenant_profile_configuration.py delete mode 100644 tb_rest_client/models/models_pe/tenant_profile_data.py delete mode 100644 tb_rest_client/models/models_pe/tenant_profile_id.py delete mode 100644 tb_rest_client/models/models_pe/uri.py delete mode 100644 tb_rest_client/models/models_pe/url.py 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 deleted file mode 100644 index e14a2aba..00000000 --- a/tb_rest_client/api/api_ce/device_api_controller_api.py +++ /dev/null @@ -1,846 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -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. - 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 - """claimDevice # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.claim_device_using_post(device_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param str json: json - :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 - """claimDevice # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.claim_device_using_post_with_http_info(device_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param str json: json - :return: DeferredResultResponseEntity - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['device_token', 'json'] # 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']): - 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 'json' in params: - body_params = params['json'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/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, **kwargs): # noqa: E501 - """getDeviceAttributes # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_device_attributes_using_get(device_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param str client_keys: clientKeys - :param str shared_keys: sharedKeys - :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, **kwargs) # noqa: E501 - else: - (data) = self.get_device_attributes_using_get_with_http_info(device_token, **kwargs) # noqa: E501 - return data - - def get_device_attributes_using_get_with_http_info(self, device_token, **kwargs): # noqa: E501 - """getDeviceAttributes # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_device_attributes_using_get_with_http_info(device_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param str client_keys: clientKeys - :param str shared_keys: sharedKeys - :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']): - 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 - - 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 - - # 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/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 post_device_attributes_using_post(self, device_token, json, **kwargs): # noqa: E501 - """postDeviceAttributes # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.post_device_attributes_using_post(device_token, json, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param str json: json (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.post_device_attributes_using_post_with_http_info(device_token, json, **kwargs) # noqa: E501 - else: - (data) = self.post_device_attributes_using_post_with_http_info(device_token, json, **kwargs) # noqa: E501 - return data - - def post_device_attributes_using_post_with_http_info(self, device_token, json, **kwargs): # noqa: E501 - """postDeviceAttributes # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.post_device_attributes_using_post_with_http_info(device_token, json, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param str json: json (required) - :return: DeferredResultResponseEntity - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['device_token', 'json'] # 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']): - 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 - # verify the required parameter 'json' is set - if ('json' not in params or - params['json'] is None): - raise ValueError( - "Missing the required parameter `json` 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 'json' in params: - body_params = params['json'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/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, json, **kwargs): # noqa: E501 - """postRpcRequest # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.post_rpc_request_using_post(device_token, json, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param str json: json (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.post_rpc_request_using_post_with_http_info(device_token, json, **kwargs) # noqa: E501 - else: - (data) = self.post_rpc_request_using_post_with_http_info(device_token, json, **kwargs) # noqa: E501 - return data - - def post_rpc_request_using_post_with_http_info(self, device_token, json, **kwargs): # noqa: E501 - """postRpcRequest # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.post_rpc_request_using_post_with_http_info(device_token, json, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param str json: json (required) - :return: DeferredResultResponseEntity - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['device_token', 'json'] # 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']): - 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 - # verify the required parameter 'json' is set - if ('json' not in params or - params['json'] is None): - raise ValueError( - "Missing the required parameter `json` 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 'json' in params: - body_params = params['json'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/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, json, **kwargs): # noqa: E501 - """postTelemetry # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.post_telemetry_using_post(device_token, json, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param str json: json (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.post_telemetry_using_post_with_http_info(device_token, json, **kwargs) # noqa: E501 - else: - (data) = self.post_telemetry_using_post_with_http_info(device_token, json, **kwargs) # noqa: E501 - return data - - def post_telemetry_using_post_with_http_info(self, device_token, json, **kwargs): # noqa: E501 - """postTelemetry # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.post_telemetry_using_post_with_http_info(device_token, json, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param str json: json (required) - :return: DeferredResultResponseEntity - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['device_token', 'json'] # 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']): - 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 - # verify the required parameter 'json' is set - if ('json' not in params or - params['json'] is None): - raise ValueError( - "Missing the required parameter `json` 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 'json' in params: - body_params = params['json'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/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 reply_to_command_using_post(self, device_token, request_id, json, **kwargs): # noqa: E501 - """replyToCommand # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.reply_to_command_using_post(device_token, request_id, json, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param int request_id: requestId (required) - :param str json: json (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.reply_to_command_using_post_with_http_info(device_token, request_id, json, - **kwargs) # noqa: E501 - else: - (data) = self.reply_to_command_using_post_with_http_info(device_token, request_id, json, - **kwargs) # noqa: E501 - return data - - def reply_to_command_using_post_with_http_info(self, device_token, request_id, json, **kwargs): # noqa: E501 - """replyToCommand # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.reply_to_command_using_post_with_http_info(device_token, request_id, json, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param int request_id: requestId (required) - :param str json: json (required) - :return: DeferredResultResponseEntity - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['device_token', 'request_id', 'json'] # 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']): - 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 - # verify the required parameter 'json' is set - if ('json' not in params or - params['json'] is None): - raise ValueError( - "Missing the required parameter `json` 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 'json' in params: - body_params = params['json'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/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 - """subscribeToAttributes # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.subscribe_to_attributes_using_get(device_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param int timeout: timeout - :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 - """subscribeToAttributes # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.subscribe_to_attributes_using_get_with_http_info(device_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param int timeout: timeout - :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']): - 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 - - # 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/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 - """subscribeToCommands # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.subscribe_to_commands_using_get(device_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param int timeout: timeout - :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 - """subscribeToCommands # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.subscribe_to_commands_using_get_with_http_info(device_token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_token: deviceToken (required) - :param int timeout: timeout - :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']): - 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 - - # 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/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_ce/entity_query_controller.py b/tb_rest_client/api/api_ce/entity_query_controller.py deleted file mode 100644 index db429231..00000000 --- a/tb_rest_client/api/api_ce/entity_query_controller.py +++ /dev/null @@ -1,451 +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 -""" - -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 EntityQueryControllerApi(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 count_entities_by_query_using_post(self, query, **kwargs): # noqa: E501 - """countEntitiesByQuery # 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_entities_by_query_using_post(query, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param EntityCountQuery query: query (required) - :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_entities_by_query_using_post_with_http_info(query, **kwargs) # noqa: E501 - else: - (data) = self.count_entities_by_query_using_post_with_http_info(query, **kwargs) # noqa: E501 - return data - - def count_entities_by_query_using_post_with_http_info(self, query, **kwargs): # noqa: E501 - """countEntitiesByQuery # 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_entities_by_query_using_post_with_http_info(query, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param EntityCountQuery query: query (required) - :return: int - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['query'] # 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_entities_by_query_using_post" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'query' is set - if self.api_client.client_side_validation and ('query' not in params or - params['query'] is None): # noqa: E501 - raise ValueError( - "Missing the required parameter `query` when calling `count_entities_by_query_using_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'query' in params: - body_params = params['query'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/entitiesQuery/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 find_alarm_data_by_query_using_post(self, query, **kwargs): # noqa: E501 - """findAlarmDataByQuery # 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_alarm_data_by_query_using_post(query, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AlarmDataQuery query: query (required) - :return: PageDataAlarmData - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_alarm_data_by_query_using_post_with_http_info(query, **kwargs) # noqa: E501 - else: - (data) = self.find_alarm_data_by_query_using_post_with_http_info(query, **kwargs) # noqa: E501 - return data - - def find_alarm_data_by_query_using_post_with_http_info(self, query, **kwargs): # noqa: E501 - """findAlarmDataByQuery # 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_alarm_data_by_query_using_post_with_http_info(query, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AlarmDataQuery query: query (required) - :return: PageDataAlarmData - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['query'] # 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_alarm_data_by_query_using_post" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'query' is set - if self.api_client.client_side_validation and ('query' not in params or - params['query'] is None): # noqa: E501 - raise ValueError( - "Missing the required parameter `query` when calling `find_alarm_data_by_query_using_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'query' in params: - body_params = params['query'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/find', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PageDataAlarmData', # 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_entity_data_by_query_using_post(self, query, **kwargs): # noqa: E501 - """findEntityDataByQuery # 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_entity_data_by_query_using_post(query, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param EntityDataQuery query: query (required) - :return: PageDataEntityData - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_entity_data_by_query_using_post_with_http_info(query, **kwargs) # noqa: E501 - else: - (data) = self.find_entity_data_by_query_using_post_with_http_info(query, **kwargs) # noqa: E501 - return data - - def find_entity_data_by_query_using_post_with_http_info(self, query, **kwargs): # noqa: E501 - """findEntityDataByQuery # 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_entity_data_by_query_using_post_with_http_info(query, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param EntityDataQuery query: query (required) - :return: PageDataEntityData - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['query'] # 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_entity_data_by_query_using_post" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'query' is set - if self.api_client.client_side_validation and ('query' not in params or - params['query'] is None): # noqa: E501 - raise ValueError( - "Missing the required parameter `query` when calling `find_entity_data_by_query_using_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'query' in params: - body_params = params['query'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/entitiesQuery/find', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PageDataEntityData', # 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_entity_timeseries_and_attributes_keys_by_query_using_post(self, query, timeseries, attributes, - **kwargs): # noqa: E501 - """findEntityTimeseriesAndAttributesKeysByQuery # 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_entity_timeseries_and_attributes_keys_by_query_using_post(query, timeseries, attributes, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param EntityDataQuery query: query (required) - :param bool timeseries: timeseries (required) - :param bool attributes: attributes (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.find_entity_timeseries_and_attributes_keys_by_query_using_post_with_http_info(query, timeseries, - attributes, - **kwargs) # noqa: E501 - else: - (data) = self.find_entity_timeseries_and_attributes_keys_by_query_using_post_with_http_info(query, - timeseries, - attributes, - **kwargs) # noqa: E501 - return data - - def find_entity_timeseries_and_attributes_keys_by_query_using_post_with_http_info(self, query, timeseries, - attributes, - **kwargs): # noqa: E501 - """findEntityTimeseriesAndAttributesKeysByQuery # 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_entity_timeseries_and_attributes_keys_by_query_using_post_with_http_info(query, timeseries, attributes, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param EntityDataQuery query: query (required) - :param bool timeseries: timeseries (required) - :param bool attributes: attributes (required) - :return: DeferredResultResponseEntity - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['query', 'timeseries', 'attributes'] # 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_entity_timeseries_and_attributes_keys_by_query_using_post" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'query' is set - if self.api_client.client_side_validation and ('query' not in params or - params['query'] is None): # noqa: E501 - raise ValueError( - "Missing the required parameter `query` when calling `find_entity_timeseries_and_attributes_keys_by_query_using_post`") # noqa: E501 - # verify the required parameter 'timeseries' is set - if self.api_client.client_side_validation and ('timeseries' not in params or - params['timeseries'] is None): # noqa: E501 - raise ValueError( - "Missing the required parameter `timeseries` when calling `find_entity_timeseries_and_attributes_keys_by_query_using_post`") # noqa: E501 - # verify the required parameter 'attributes' is set - if self.api_client.client_side_validation and ('attributes' not in params or - params['attributes'] is None): # noqa: E501 - raise ValueError( - "Missing the required parameter `attributes` when calling `find_entity_timeseries_and_attributes_keys_by_query_using_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'timeseries' in params: - query_params.append(('timeseries', params['timeseries'])) # noqa: E501 - if 'attributes' in params: - query_params.append(('attributes', params['attributes'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'query' in params: - body_params = params['query'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/entitiesQuery/find/keys{?timeseries,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) diff --git a/tb_rest_client/api/api_ce/rpc_controller_api.py b/tb_rest_client/api/api_ce/rpc_controller_api.py deleted file mode 100644 index cfff9989..00000000 --- a/tb_rest_client/api/api_ce/rpc_controller_api.py +++ /dev/null @@ -1,577 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -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 RpcControllerApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - 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 handle_one_way_device_rpc_request_using_post(self, device_id, request_body, **kwargs): # noqa: E501 - """handleOneWayDeviceRPCRequest # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.handle_one_way_device_rpc_request_using_post(device_id, request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_id: deviceId (required) - :param str request_body: requestBody (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.handle_one_way_device_rpc_request_using_post_with_http_info(device_id, request_body, - **kwargs) # noqa: E501 - else: - (data) = self.handle_one_way_device_rpc_request_using_post_with_http_info(device_id, request_body, - **kwargs) # noqa: E501 - return data - - def handle_one_way_device_rpc_request_using_post_with_http_info(self, device_id, request_body, - **kwargs): # noqa: E501 - """handleOneWayDeviceRPCRequest # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.handle_one_way_device_rpc_request_using_post_with_http_info(device_id, request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_id: deviceId (required) - :param str request_body: requestBody (required) - :return: DeferredResultResponseEntity - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['device_id', 'request_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']): - 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 `handle_one_way_device_rpc_request_using_post`") # noqa: E501 - # verify the required parameter 'request_body' is set - if ('request_body' not in params or - params['request_body'] is None): - raise ValueError( - "Missing the required parameter `request_body` when calling `handle_one_way_device_rpc_request_using_post`") # 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 - if 'request_body' in params: - body_params = params['request_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/plugins/rpc/oneway/{deviceId}', '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_persisted_rpc_using_get(self, rpc_id, **kwargs): - """getPersistedRpc # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_persisted_rpc_using_get(rpc_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rpc_id: rpcId (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_persisted_rpc_using_get_wih_http_info(rpc_id, **kwargs) # noqa: E501 - else: - (data) = self.get_persisted_rpc_using_get_wih_http_info(rpc_id, **kwargs) # noqa: E501 - return data - - def get_persisted_rpc_using_get_wih_http_info(self, rpc_id, **kwargs): - """getPersistedRpc # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_persisted_rpc_using_get_wih_http_info(rpc_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rpc_id: rpcId (required) - :return: DeferredResultResponseEntity - 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']): - 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 `get_persisted_rpc_using_get`") # 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( - ['*/*']) # 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/plugins/rpc/persistent/{rpcId}', '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 delete_resource_using_delete(self, rpc_id, **kwargs): - """deleteResource # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_resource_using_delete(rpc_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rpc_id: rpcId (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): - """deleteResource # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.delete_resource_using_delete_with_http_info(rpc_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rpc_id: rpcId (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']): - 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 `get_persisted_rpc_using_get`") # 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( - ['*/*']) # 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/plugins/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 get_persisted_rpc_by_device_using_get(self, device_id, page_size, page, rpc_status, **kwargs): - """getPersistedRpcByDevice # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_persisted_rpc_by_device_using_get(device_id, page_size, page, rpc_status, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_id: deviceId (required) - :param str page_size: pageSize (required) - :param str page: page (required) - :param str rpc_status: rpcStatus (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :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_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, rpc_status, - **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 - return data - - def get_persisted_rpc_by_device_using_get_with_http_info(self, device_id, page_size, page, rpc_status, **kwargs): - """getPersistedRpcByDevice # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_persisted_rpc_by_device_using_get_with_http_info(device_id, page_size, page, rpc_status, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_id: deviceId (required) - :param str page_size: pageSize (required) - :param str page: page (required) - :param str rpc_status: rpcStatus (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: DeferredResultResponseEntity - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['device_id', 'page_size', 'page', 'rpc_status', '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']): - 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_persisted_rpc_by_device_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_persisted_rpc_by_device_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_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 - if params['rpc_status'] not in ['QUEUED', 'DELIVERED', 'SUCCESSFUL', 'TIMEOUT', 'FAILED']: - raise ValueError( - "Parameter `rpc_status` only can be one of ['QUEUED', 'DELIVERED', 'SUCCESSFUL', 'TIMEOUT', 'FAILED']") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'device_id' in params: - path_params['deviceId'] = params['device_id'] # noqa: E501 - - query_params = [] - - 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 '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 'rpc_status' in params: - query_params.append(('rpcStatus', params['rpc_status'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/plugins/rpc/persistent/device/{deviceId}{?pageSize,page,rpcStatus,textSearch,sortProperty,sortOrder}', - '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 handle_two_way_device_rpc_request_using_post(self, device_id, request_body, **kwargs): # noqa: E501 - """handleTwoWayDeviceRPCRequest # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.handle_two_way_device_rpc_request_using_post(device_id, request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_id: deviceId (required) - :param str request_body: requestBody (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.handle_two_way_device_rpc_request_using_post_with_http_info(device_id, request_body, - **kwargs) # noqa: E501 - else: - (data) = self.handle_two_way_device_rpc_request_using_post_with_http_info(device_id, request_body, - **kwargs) # noqa: E501 - return data - - def handle_two_way_device_rpc_request_using_post_with_http_info(self, device_id, request_body, - **kwargs): # noqa: E501 - """handleTwoWayDeviceRPCRequest # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.handle_two_way_device_rpc_request_using_post_with_http_info(device_id, request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str device_id: deviceId (required) - :param str request_body: requestBody (required) - :return: DeferredResultResponseEntity - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['device_id', 'request_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']): - 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 `handle_two_way_device_rpc_request_using_post`") # noqa: E501 - # verify the required parameter 'request_body' is set - if ('request_body' not in params or - params['request_body'] is None): - raise ValueError( - "Missing the required parameter `request_body` when calling `handle_two_way_device_rpc_request_using_post`") # 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 - if 'request_body' in params: - body_params = params['request_body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/plugins/rpc/twoway/{deviceId}', '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) diff --git a/tb_rest_client/api/api_pe/alarm_controller_api.py b/tb_rest_client/api/api_pe/alarm_controller_api.py deleted file mode 100644 index 3b6656ed..00000000 --- a/tb_rest_client/api/api_pe/alarm_controller_api.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -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 -from tb_rest_client.api.api_ce import AlarmControllerApi - - -class AlarmControllerApi(AlarmControllerApi): - """NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - super().__init__(api_client) - - - def get_alarms_using_get(self, entity_type, entity_id, page_size, page, **kwargs): # noqa: E501 - """getAlarms # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_alarms_using_get(entity_type, entity_id, page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str entity_type: entityType (required) - :param str entity_id: entityId (required) - :param int page_size: pageSize (required) - :param int page: page (required) - :param str search_status: searchStatus - :param str status: status - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param int start_time: startTime - :param int end_time: endTime - :param str offset: offset - :param bool fetch_originator: fetchOriginator - :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_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 - return data - - def get_alarms_using_get_with_http_info(self, entity_type, entity_id, page_size, page, **kwargs): # noqa: E501 - """getAlarms # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_alarms_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: entityType (required) - :param str entity_id: entityId (required) - :param int page_size: pageSize (required) - :param int page: page (required) - :param str search_status: searchStatus - :param str status: status - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param int start_time: startTime - :param int end_time: endTime - :param str offset: offset - :param bool fetch_originator: fetchOriginator - :return: PageDataAlarmInfo - If the method is called asynchronously, - 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', 'offset', 'fetch_originator'] # 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']): - - 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_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 - # 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 - # 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_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 'search_status' in params: - query_params.append(('searchStatus', params['search_status'])) # noqa: E501 - if 'status' in params: - query_params.append(('status', params['status'])) # 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 - if 'offset' in params: - query_params.append(('offset', params['offset'])) # noqa: E501 - if 'fetch_originator' in params: - query_params.append(('fetchOriginator', params['fetch_originator'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/{entityType}/{entityId}{?searchStatus,status,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime,offset,fetchOriginator}', '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) 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 deleted file mode 100644 index 6bfc7040..00000000 --- a/tb_rest_client/api/api_pe/audit_log_controller_api.py +++ /dev/null @@ -1,565 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from tb_rest_client.api.api_ce import AuditLogControllerApi - - -class AuditLogControllerApi(AuditLogControllerApi): - """NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - super().__init__(api_client) - - def get_audit_logs_by_customer_id_using_get(self, customer_id, page_size, page, **kwargs): # noqa: E501 - """getAuditLogsByCustomerId # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_by_customer_id_using_get(customer_id, page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str customer_id: customerId (required) - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param int start_time: startTime - :param int end_time: endTime - :param str action_types: actionTypes - :return: PageDataAuditLog - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_audit_logs_by_customer_id_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 - else: - (data) = self.get_audit_logs_by_customer_id_using_get_with_http_info(customer_id, page_size, page, **kwargs) # noqa: E501 - return data - - def get_audit_logs_by_customer_id_using_get_with_http_info(self, customer_id, page_size, page, **kwargs): # noqa: E501 - """getAuditLogsByCustomerId # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_by_customer_id_using_get_with_http_info(customer_id, page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str customer_id: customerId (required) - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param int start_time: startTime - :param int end_time: endTime - :param str action_types: actionTypes - :return: PageDataAuditLog - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['customer_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'action_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']): - - 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_audit_logs_by_customer_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_audit_logs_by_customer_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_audit_logs_by_customer_id_using_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'customer_id' in params: - path_params['customerId'] = params['customer_id'] # noqa: E501 - - query_params = [] - 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 - if 'action_types' in params: - query_params.append(('actionTypes', params['action_types'])) # 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 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/audit/logs/customer/{customerId}{?textSearch,sortProperty,sortOrder,startTime,endTime,actionTypes,pageSize,page}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PageDataAuditLog', # 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_audit_logs_by_entity_id_using_get(self, entity_type, entity_id, page_size, page, **kwargs): # noqa: E501 - """getAuditLogsByEntityId # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_by_entity_id_using_get(entity_type, entity_id, page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str entity_type: entityType (required) - :param str entity_id: entityId (required) - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param int start_time: startTime - :param int end_time: endTime - :param str action_types: actionTypes - :return: PageDataAuditLog - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_audit_logs_by_entity_id_using_get_with_http_info(entity_type, entity_id, page_size, page, **kwargs) # noqa: E501 - else: - (data) = self.get_audit_logs_by_entity_id_using_get_with_http_info(entity_type, entity_id, page_size, page, **kwargs) # noqa: E501 - return data - - def get_audit_logs_by_entity_id_using_get_with_http_info(self, entity_type, entity_id, page_size, page, **kwargs): # noqa: E501 - """getAuditLogsByEntityId # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_by_entity_id_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: entityType (required) - :param str entity_id: entityId (required) - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param int start_time: startTime - :param int end_time: endTime - :param str action_types: actionTypes - :return: PageDataAuditLog - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['entity_type', 'entity_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'action_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']): - - 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_audit_logs_by_entity_id_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_audit_logs_by_entity_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_audit_logs_by_entity_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_audit_logs_by_entity_id_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 '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 - if 'action_types' in params: - query_params.append(('actionTypes', params['action_types'])) # 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 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/audit/logs/entity/{entityType}/{entityId}{?textSearch,sortProperty,sortOrder,startTime,endTime,actionTypes,pageSize,page}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PageDataAuditLog', # 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_audit_logs_by_user_id_using_get(self, user_id, page_size, page, **kwargs): # noqa: E501 - """getAuditLogsByUserId # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_by_user_id_using_get(user_id, page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: userId (required) - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param int start_time: startTime - :param int end_time: endTime - :param str action_types: actionTypes - :return: PageDataAuditLog - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_audit_logs_by_user_id_using_get_with_http_info(user_id, page_size, page, **kwargs) # noqa: E501 - else: - (data) = self.get_audit_logs_by_user_id_using_get_with_http_info(user_id, page_size, page, **kwargs) # noqa: E501 - return data - - def get_audit_logs_by_user_id_using_get_with_http_info(self, user_id, page_size, page, **kwargs): # noqa: E501 - """getAuditLogsByUserId # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_by_user_id_using_get_with_http_info(user_id, page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: userId (required) - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param int start_time: startTime - :param int end_time: endTime - :param str action_types: actionTypes - :return: PageDataAuditLog - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['user_id', 'page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'action_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']): - - 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_audit_logs_by_user_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_audit_logs_by_user_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_audit_logs_by_user_id_using_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in params: - path_params['userId'] = params['user_id'] # noqa: E501 - - query_params = [] - 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 - if 'action_types' in params: - query_params.append(('actionTypes', params['action_types'])) # 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 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/audit/logs/user/{userId}{?textSearch,sortProperty,sortOrder,startTime,endTime,actionTypes,pageSize,page}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PageDataAuditLog', # 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_audit_logs_using_get(self, page_size, page, **kwargs): # noqa: E501 - """getAuditLogs # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_using_get(page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param int start_time: startTime - :param int end_time: endTime - :param str action_types: actionTypes - :return: PageDataAuditLog - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_audit_logs_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 - else: - (data) = self.get_audit_logs_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 - return data - - def get_audit_logs_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """getAuditLogs # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_audit_logs_using_get_with_http_info(page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :param int start_time: startTime - :param int end_time: endTime - :param str action_types: actionTypes - :return: PageDataAuditLog - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['page_size', 'page', 'text_search', 'sort_property', 'sort_order', 'start_time', 'end_time', 'action_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']): - - 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_audit_logs_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_audit_logs_using_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - 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 - if 'action_types' in params: - query_params.append(('actionTypes', params['action_types'])) # 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 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/audit/logs{?textSearch,sortProperty,sortOrder,startTime,endTime,actionTypes,pageSize,page}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PageDataAuditLog', # 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/event_controller_api.py b/tb_rest_client/api/api_pe/event_controller_api.py deleted file mode 100644 index 7b473501..00000000 --- a/tb_rest_client/api/api_pe/event_controller_api.py +++ /dev/null @@ -1,331 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from tb_rest_client.api.api_ce import EventControllerApi - - -class EventControllerApi(EventControllerApi): - """NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - super(EventControllerApi, self).__init__(api_client) - - def get_events_using_get(self, entity_type, entity_id, event_type, tenant_id, page_size, page, **kwargs): # noqa: E501 - """getEvents # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_events_using_get(entity_type, entity_id, event_type, tenant_id, page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str entity_type: entityType (required) - :param str entity_id: entityId (required) - :param str event_type: eventType (required) - :param str tenant_id: tenantId (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 - :param int start_time: startTime - :param int end_time: endTime - :return: PageDataEvent - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_events_using_get_with_http_info(entity_type, entity_id, event_type, tenant_id, page_size, page, **kwargs) # noqa: E501 - else: - (data) = self.get_events_using_get_with_http_info(entity_type, entity_id, event_type, tenant_id, page_size, page, **kwargs) # noqa: E501 - return data - - def get_events_using_get_with_http_info(self, entity_type, entity_id, event_type, tenant_id, page_size, page, **kwargs): # noqa: E501 - """getEvents # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_events_using_get_with_http_info(entity_type, entity_id, event_type, tenant_id, page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str entity_type: entityType (required) - :param str entity_id: entityId (required) - :param str event_type: eventType (required) - :param str tenant_id: tenantId (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 - :param int start_time: startTime - :param int end_time: endTime - :return: PageDataEvent - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['entity_type', 'entity_id', 'event_type', 'tenant_id', 'page_size', 'page', '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']): - - 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_events_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_events_using_get`") # noqa: E501 - # verify the required parameter 'event_type' is set - if ('event_type' not in params or - params['event_type'] is None): - raise ValueError("Missing the required parameter `event_type` when calling `get_events_using_get`") # noqa: E501 - # 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_events_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_events_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_events_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 'event_type' in params: - path_params['eventType'] = params['event_type'] # noqa: E501 - - query_params = [] - if 'tenant_id' in params: - query_params.append(('tenantId', params['tenant_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( - ['*/*']) # 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}/{eventType}{?tenantId,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PageDataEvent', # 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_get1(self, entity_type, entity_id, tenant_id, page_size, page, **kwargs): # noqa: E501 - """getEvents # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_events_using_get1(entity_type, entity_id, tenant_id, page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str entity_type: entityType (required) - :param str entity_id: entityId (required) - :param str tenant_id: tenantId (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 - :param int start_time: startTime - :param int end_time: endTime - :return: PageDataEvent - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_events_using_get1_with_http_info(entity_type, entity_id, tenant_id, page_size, page, **kwargs) # noqa: E501 - else: - (data) = self.get_events_using_get1_with_http_info(entity_type, entity_id, tenant_id, page_size, page, **kwargs) # noqa: E501 - return data - - def get_events_using_get1_with_http_info(self, entity_type, entity_id, tenant_id, page_size, page, **kwargs): # noqa: E501 - """getEvents # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_events_using_get1_with_http_info(entity_type, entity_id, tenant_id, page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str entity_type: entityType (required) - :param str entity_id: entityId (required) - :param str tenant_id: tenantId (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 - :param int start_time: startTime - :param int end_time: endTime - :return: PageDataEvent - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['entity_type', 'entity_id', 'tenant_id', 'page_size', 'page', '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']): - - 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_events_using_get1`") # 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_events_using_get1`") # noqa: E501 - # 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_events_using_get1`") # 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_events_using_get1`") # 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_events_using_get1`") # 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 'tenant_id' in params: - query_params.append(('tenantId', params['tenant_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( - ['*/*']) # 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}{?tenantId,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PageDataEvent', # 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/rule_chain_controller_api.py b/tb_rest_client/api/api_pe/rule_chain_controller_api.py deleted file mode 100644 index cbec6632..00000000 --- a/tb_rest_client/api/api_pe/rule_chain_controller_api.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from tb_rest_client.api.api_ce import RuleChainControllerApi - - -class RuleChainControllerApi(RuleChainControllerApi): - """NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - super().__init__(api_client) - - def get_rule_chains_using_get(self, page_size, page, **kwargs): # noqa: E501 - """getRuleChains # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_rule_chains_using_get(page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataRuleChain - 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_chains_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 - else: - (data) = self.get_rule_chains_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 - return data - - def get_rule_chains_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """getRuleChains # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_rule_chains_using_get_with_http_info(page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataRuleChain - 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']): - - 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_rule_chains_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_rule_chains_using_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - 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 '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 - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/ruleChains{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PageDataRuleChain', # 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/widgets_bundle_controller_api.py b/tb_rest_client/api/api_pe/widgets_bundle_controller_api.py deleted file mode 100644 index f81640dd..00000000 --- a/tb_rest_client/api/api_pe/widgets_bundle_controller_api.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from tb_rest_client.api.api_ce import WidgetsBundleControllerApi - - -class WidgetsBundleControllerApi(WidgetsBundleControllerApi): - """NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - super().__init__(api_client) - - def get_widgets_bundles_using_get(self, page_size, page, **kwargs): # noqa: E501 - """getWidgetsBundles # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_widgets_bundles_using_get(page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataWidgetsBundle - 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_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 - else: - (data) = self.get_widgets_bundles_using_get_with_http_info(page_size, page, **kwargs) # noqa: E501 - return data - - def get_widgets_bundles_using_get_with_http_info(self, page_size, page, **kwargs): # noqa: E501 - """getWidgetsBundles # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api_pe.get_widgets_bundles_using_get_with_http_info(page_size, page, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str page_size: pageSize (required) - :param str page: page (required) - :param str text_search: textSearch - :param str sort_property: sortProperty - :param str sort_order: sortOrder - :return: PageDataWidgetsBundle - 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']): - - 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_widgets_bundles_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_widgets_bundles_using_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - 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 '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 - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/widgetsBundles{?textSearch,sortProperty,sortOrder,pageSize,page}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='PageDataWidgetsBundle', # 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/models/models_ce/admin_settings_id.py b/tb_rest_client/models/models_ce/admin_settings_id.py index f3cd3eba..d4871736 100644 --- a/tb_rest_client/models/models_ce/admin_settings_id.py +++ b/tb_rest_client/models/models_ce/admin_settings_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class AdminSettingsId(object): + +class AdminSettingsId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class AdminSettingsId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """AdminSettingsId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_ce/alarm_id.py b/tb_rest_client/models/models_ce/alarm_id.py index 17c31c57..82a6b5df 100644 --- a/tb_rest_client/models/models_ce/alarm_id.py +++ b/tb_rest_client/models/models_ce/alarm_id.py @@ -14,8 +14,9 @@ import re # noqa: F401 import six +from . import EntityId -class AlarmId(object): +class AlarmId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +28,10 @@ class AlarmId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """AlarmId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_ce/asset_id.py b/tb_rest_client/models/models_ce/asset_id.py index f6aae1aa..60679554 100644 --- a/tb_rest_client/models/models_ce/asset_id.py +++ b/tb_rest_client/models/models_ce/asset_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class AssetId(object): + +class AssetId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class AssetId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """AssetId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): 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 262f0b26..7cc6559d 100644 --- a/tb_rest_client/models/models_ce/audit_log_id.py +++ b/tb_rest_client/models/models_ce/audit_log_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class AuditLogId(object): + +class AuditLogId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class AuditLogId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """AuditLogId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_ce/blob_entity_id.py b/tb_rest_client/models/models_ce/blob_entity_id.py deleted file mode 100644 index db00f0b2..00000000 --- a/tb_rest_client/models/models_ce/blob_entity_id.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class BlobEntityId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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_type': 'str', - 'id': 'str' - } - - attribute_map = { - 'entity_type': 'entityType', - 'id': 'id' - } - - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None - self._id = None - self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type - if id is not None: - self.id = id - - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 - - - :return: The id of this EntityId. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this EntityId. - - - :param id: The id of this EntityId. # noqa: E501 - :type: str - """ - - 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(self.__class__, 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, self.__class__): - 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/component_descriptor_id.py b/tb_rest_client/models/models_ce/component_descriptor_id.py index 12f34bab..fa6aa348 100644 --- a/tb_rest_client/models/models_ce/component_descriptor_id.py +++ b/tb_rest_client/models/models_ce/component_descriptor_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class ComponentDescriptorId(object): + +class ComponentDescriptorId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class ComponentDescriptorId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """ComponentDescriptorId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_ce/converter_id.py b/tb_rest_client/models/models_ce/converter_id.py deleted file mode 100644 index 423e2845..00000000 --- a/tb_rest_client/models/models_ce/converter_id.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class ConverterId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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_type': 'str', - 'id': 'str' - } - - attribute_map = { - 'entity_type': 'entityType', - 'id': 'id' - } - - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None - self._id = None - self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type - if id is not None: - self.id = id - - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 - - - :return: The id of this EntityId. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this EntityId. - - - :param id: The id of this EntityId. # noqa: E501 - :type: str - """ - - 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(self.__class__, 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, self.__class__): - 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/customer_id.py b/tb_rest_client/models/models_ce/customer_id.py index 80f87f10..b03dbdea 100644 --- a/tb_rest_client/models/models_ce/customer_id.py +++ b/tb_rest_client/models/models_ce/customer_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class CustomerId(object): + +class CustomerId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class CustomerId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """CustomerId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_ce/dashboard_id.py b/tb_rest_client/models/models_ce/dashboard_id.py index 77c5359d..d8e2e0fc 100644 --- a/tb_rest_client/models/models_ce/dashboard_id.py +++ b/tb_rest_client/models/models_ce/dashboard_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class DashboardId(object): + +class DashboardId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class DashboardId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """DashboardId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): 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 899fd969..457dc1cb 100644 --- a/tb_rest_client/models/models_ce/device_credentials_id.py +++ b/tb_rest_client/models/models_ce/device_credentials_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class DeviceCredentialsId(object): + +class DeviceCredentialsId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class DeviceCredentialsId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """DeviceCredentialsId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_ce/device_id.py b/tb_rest_client/models/models_ce/device_id.py index 6fbb843c..68f7ee15 100644 --- a/tb_rest_client/models/models_ce/device_id.py +++ b/tb_rest_client/models/models_ce/device_id.py @@ -15,7 +15,10 @@ import six -class DeviceId(object): +from . import EntityId + + +class DeviceId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +30,10 @@ class DeviceId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """DeviceId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): 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 e8d6ea06..b1886f0d 100644 --- a/tb_rest_client/models/models_ce/device_profile_id.py +++ b/tb_rest_client/models/models_ce/device_profile_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class DeviceProfileId(object): + +class DeviceProfileId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class DeviceProfileId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """DeviceProfileId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): 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 dff870bc..079bd29c 100644 --- a/tb_rest_client/models/models_ce/edge_event_id.py +++ b/tb_rest_client/models/models_ce/edge_event_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class EdgeEventId(object): + +class EdgeEventId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class EdgeEventId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """EdgeEventId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_ce/edge_id.py b/tb_rest_client/models/models_ce/edge_id.py index d8ef13e6..004ff242 100644 --- a/tb_rest_client/models/models_ce/edge_id.py +++ b/tb_rest_client/models/models_ce/edge_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class EdgeId(object): + +class EdgeId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class EdgeId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """EdgeId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_ce/entity_group_id.py b/tb_rest_client/models/models_ce/entity_group_id.py deleted file mode 100644 index 4bb5022b..00000000 --- a/tb_rest_client/models/models_ce/entity_group_id.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class EntityGroupId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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_type': 'str', - 'id': 'str' - } - - attribute_map = { - 'entity_type': 'entityType', - 'id': 'id' - } - - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None - self._id = None - self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type - if id is not None: - self.id = id - - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 - - - :return: The id of this EntityId. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this EntityId. - - - :param id: The id of this EntityId. # noqa: E501 - :type: str - """ - - 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(self.__class__, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return self._id #.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, self.__class__): - 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_type_filter.py b/tb_rest_client/models/models_ce/entity_type_filter.py deleted file mode 100644 index b67dc1ad..00000000 --- a/tb_rest_client/models/models_ce/entity_type_filter.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class EntityTypeFilter(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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 = { - 'relation_type': 'str', - 'entity_types': 'list[str]' - } - - attribute_map = { - 'relation_type': 'relationType', - 'entity_types': 'entityTypes' - } - - def __init__(self, relation_type=None, entity_types=None): # noqa: E501 - """EntityTypeFilter - a model defined in Swagger""" # noqa: E501 - - self._relation_type = None - self._entity_types = None - self.discriminator = None - - self.relation_type = relation_type - self.entity_types = entity_types - - @property - def relation_type(self): - """Gets the relation_type of this EntityTypeFilter. # noqa: E501 - - - :return: The relation_type of this EntityTypeFilter. # noqa: E501 - :rtype: str - """ - return self._relation_type - - @relation_type.setter - def relation_type(self, relation_type): - """Sets the relation_type of this EntityTypeFilter. - - - :param relation_type: The relation_type of this EntityTypeFilter. # noqa: E501 - :type: str - """ - if relation_type is None: - raise ValueError("Invalid value for `relation_type`, must not be `None`") # noqa: E501 - - self._relation_type = relation_type - - @property - def entity_types(self): - """Gets the entity_types of this EntityTypeFilter. # noqa: E501 - - - :return: The entity_types of this EntityTypeFilter. # noqa: E501 - :rtype: list[str] - """ - return self._entity_types - - @entity_types.setter - def entity_types(self, entity_types): - """Sets the entity_types of this EntityTypeFilter. - - - :param entity_types: The entity_types of this EntityTypeFilter. # noqa: E501 - :type: list[str] - """ - if entity_types is None: - raise ValueError("Invalid value for `entity_types`, must not be `None`") # noqa: E501 - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "RULE_CHAIN", "RULE_NODE", "ENTITY_VIEW", "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 - - 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(EntityTypeFilter, 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, EntityTypeFilter): - 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/group_permission_id.py b/tb_rest_client/models/models_ce/group_permission_id.py deleted file mode 100644 index 5bb5c81a..00000000 --- a/tb_rest_client/models/models_ce/group_permission_id.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class GroupPermissionId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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_type': 'str', - 'id': 'str' - } - - attribute_map = { - 'entity_type': 'entityType', - 'id': 'id' - } - - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None - self._id = None - self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type - if id is not None: - self.id = id - - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 - - - :return: The id of this EntityId. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this EntityId. - - - :param id: The id of this EntityId. # noqa: E501 - :type: str - """ - - 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(self.__class__, 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, self.__class__): - 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/integration_id.py b/tb_rest_client/models/models_ce/integration_id.py deleted file mode 100644 index 86850e26..00000000 --- a/tb_rest_client/models/models_ce/integration_id.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class IntegrationId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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_type': 'str', - 'id': 'str' - } - - attribute_map = { - 'entity_type': 'entityType', - 'id': 'id' - } - - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None - self._id = None - self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type - if id is not None: - self.id = id - - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 - - - :return: The id of this EntityId. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this EntityId. - - - :param id: The id of this EntityId. # noqa: E501 - :type: str - """ - - 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(self.__class__, 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, self.__class__): - 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/o_auth2_integration_id.py b/tb_rest_client/models/models_ce/o_auth2_integration_id.py deleted file mode 100644 index 99197c56..00000000 --- a/tb_rest_client/models/models_ce/o_auth2_integration_id.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class OAuth2IntegrationId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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 - """OAuth2IntegrationId - a model defined in Swagger""" # noqa: E501 - - self._id = None - self.discriminator = None - - if id is not None: - self.id = id - - @property - def id(self): - """Gets the id of this OAuth2IntegrationId. # noqa: E501 - - - :return: The id of this OAuth2IntegrationId. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this OAuth2IntegrationId. - - - :param id: The id of this OAuth2IntegrationId. # noqa: E501 - :type: str - """ - - 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(OAuth2IntegrationId, 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, OAuth2IntegrationId): - 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/role_id.py b/tb_rest_client/models/models_ce/role_id.py deleted file mode 100644 index 666fad8c..00000000 --- a/tb_rest_client/models/models_ce/role_id.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class RoleId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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_type': 'str', - 'id': 'str' - } - - attribute_map = { - 'entity_type': 'entityType', - 'id': 'id' - } - - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None - self._id = None - self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type - if id is not None: - self.id = id - - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 - - - :return: The id of this EntityId. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this EntityId. - - - :param id: The id of this EntityId. # noqa: E501 - :type: str - """ - - 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(self.__class__, 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, self.__class__): - 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/scheduler_event_id.py b/tb_rest_client/models/models_ce/scheduler_event_id.py deleted file mode 100644 index 67f0dee8..00000000 --- a/tb_rest_client/models/models_ce/scheduler_event_id.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class SchedulerEventId(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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_type': 'str', - 'id': 'str' - } - - attribute_map = { - 'entity_type': 'entityType', - 'id': 'id' - } - - def __init__(self, entity_type=None, id=None): # noqa: E501 - """EntityId - a model defined in Swagger""" # noqa: E501 - - self._entity_type = None - self._id = None - self.discriminator = None - - if entity_type is not None: - self.entity_type = entity_type - if id is not None: - self.id = id - - @property - def entity_type(self): - """Gets the entity_type of this EntityId. # noqa: E501 - - - :return: The entity_type of this EntityId. # noqa: E501 - :rtype: str - """ - return self._entity_type - - @entity_type.setter - def entity_type(self, entity_type): - """Sets the entity_type of this EntityId. - - - :param entity_type: The entity_type of this EntityId. # noqa: E501 - :type: str - """ - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 id(self): - """Gets the id of this EntityId. # noqa: E501 - - - :return: The id of this EntityId. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this EntityId. - - - :param id: The id of this EntityId. # noqa: E501 - :type: str - """ - - 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(self.__class__, 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, self.__class__): - 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 253e720c..aaca731b 100644 --- a/tb_rest_client/models/models_ce/tenant_id.py +++ b/tb_rest_client/models/models_ce/tenant_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class TenantId(object): + +class TenantId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class TenantId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """TenantId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): 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 8dfcf838..75becf37 100644 --- a/tb_rest_client/models/models_ce/tenant_profile_id.py +++ b/tb_rest_client/models/models_ce/tenant_profile_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class TenantProfileId(object): + +class TenantProfileId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class TenantProfileId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """TenantProfileId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_ce/text_page_data_asset.py b/tb_rest_client/models/models_ce/text_page_data_asset.py deleted file mode 100644 index ffe9cb95..00000000 --- a/tb_rest_client/models/models_ce/text_page_data_asset.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TextPageDataAsset(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'next_page_link': 'TextPageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TextPageDataAsset - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TextPageDataAsset. # noqa: E501 - - - :return: The data of this TextPageDataAsset. # noqa: E501 - :rtype: list[Asset] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TextPageDataAsset. - - - :param data: The data of this TextPageDataAsset. # noqa: E501 - :type: list[Asset] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TextPageDataAsset. # noqa: E501 - - - :return: The has_next of this TextPageDataAsset. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TextPageDataAsset. - - - :param has_next: The has_next of this TextPageDataAsset. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TextPageDataAsset. # noqa: E501 - - - :return: The next_page_link of this TextPageDataAsset. # noqa: E501 - :rtype: TextPageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TextPageDataAsset. - - - :param next_page_link: The next_page_link of this TextPageDataAsset. # noqa: E501 - :type: TextPageLink - """ - - self._next_page_link = next_page_link - - 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(TextPageDataAsset, 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, TextPageDataAsset): - 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/text_page_data_customer.py b/tb_rest_client/models/models_ce/text_page_data_customer.py deleted file mode 100644 index f3234d22..00000000 --- a/tb_rest_client/models/models_ce/text_page_data_customer.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TextPageDataCustomer(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'next_page_link': 'TextPageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TextPageDataCustomer - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TextPageDataCustomer. # noqa: E501 - - - :return: The data of this TextPageDataCustomer. # noqa: E501 - :rtype: list[Customer] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TextPageDataCustomer. - - - :param data: The data of this TextPageDataCustomer. # noqa: E501 - :type: list[Customer] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TextPageDataCustomer. # noqa: E501 - - - :return: The has_next of this TextPageDataCustomer. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TextPageDataCustomer. - - - :param has_next: The has_next of this TextPageDataCustomer. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TextPageDataCustomer. # noqa: E501 - - - :return: The next_page_link of this TextPageDataCustomer. # noqa: E501 - :rtype: TextPageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TextPageDataCustomer. - - - :param next_page_link: The next_page_link of this TextPageDataCustomer. # noqa: E501 - :type: TextPageLink - """ - - self._next_page_link = next_page_link - - 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(TextPageDataCustomer, 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, TextPageDataCustomer): - 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/text_page_data_dashboard_info.py b/tb_rest_client/models/models_ce/text_page_data_dashboard_info.py deleted file mode 100644 index 58352c9b..00000000 --- a/tb_rest_client/models/models_ce/text_page_data_dashboard_info.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TextPageDataDashboardInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'next_page_link': 'TextPageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TextPageDataDashboardInfo - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TextPageDataDashboardInfo. # noqa: E501 - - - :return: The data of this TextPageDataDashboardInfo. # noqa: E501 - :rtype: list[DashboardInfo] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TextPageDataDashboardInfo. - - - :param data: The data of this TextPageDataDashboardInfo. # noqa: E501 - :type: list[DashboardInfo] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TextPageDataDashboardInfo. # noqa: E501 - - - :return: The has_next of this TextPageDataDashboardInfo. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TextPageDataDashboardInfo. - - - :param has_next: The has_next of this TextPageDataDashboardInfo. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TextPageDataDashboardInfo. # noqa: E501 - - - :return: The next_page_link of this TextPageDataDashboardInfo. # noqa: E501 - :rtype: TextPageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TextPageDataDashboardInfo. - - - :param next_page_link: The next_page_link of this TextPageDataDashboardInfo. # noqa: E501 - :type: TextPageLink - """ - - self._next_page_link = next_page_link - - 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(TextPageDataDashboardInfo, 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, TextPageDataDashboardInfo): - 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/text_page_data_device.py b/tb_rest_client/models/models_ce/text_page_data_device.py deleted file mode 100644 index 8803411c..00000000 --- a/tb_rest_client/models/models_ce/text_page_data_device.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TextPageDataDevice(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'next_page_link': 'TextPageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TextPageDataDevice - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TextPageDataDevice. # noqa: E501 - - - :return: The data of this TextPageDataDevice. # noqa: E501 - :rtype: list[Device] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TextPageDataDevice. - - - :param data: The data of this TextPageDataDevice. # noqa: E501 - :type: list[Device] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TextPageDataDevice. # noqa: E501 - - - :return: The has_next of this TextPageDataDevice. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TextPageDataDevice. - - - :param has_next: The has_next of this TextPageDataDevice. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TextPageDataDevice. # noqa: E501 - - - :return: The next_page_link of this TextPageDataDevice. # noqa: E501 - :rtype: TextPageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TextPageDataDevice. - - - :param next_page_link: The next_page_link of this TextPageDataDevice. # noqa: E501 - :type: TextPageLink - """ - - self._next_page_link = next_page_link - - 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(TextPageDataDevice, 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, TextPageDataDevice): - 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/text_page_data_entity_view.py b/tb_rest_client/models/models_ce/text_page_data_entity_view.py deleted file mode 100644 index ccc369be..00000000 --- a/tb_rest_client/models/models_ce/text_page_data_entity_view.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TextPageDataEntityView(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'next_page_link': 'TextPageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TextPageDataEntityView - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TextPageDataEntityView. # noqa: E501 - - - :return: The data of this TextPageDataEntityView. # noqa: E501 - :rtype: list[EntityView] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TextPageDataEntityView. - - - :param data: The data of this TextPageDataEntityView. # noqa: E501 - :type: list[EntityView] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TextPageDataEntityView. # noqa: E501 - - - :return: The has_next of this TextPageDataEntityView. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TextPageDataEntityView. - - - :param has_next: The has_next of this TextPageDataEntityView. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TextPageDataEntityView. # noqa: E501 - - - :return: The next_page_link of this TextPageDataEntityView. # noqa: E501 - :rtype: TextPageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TextPageDataEntityView. - - - :param next_page_link: The next_page_link of this TextPageDataEntityView. # noqa: E501 - :type: TextPageLink - """ - - self._next_page_link = next_page_link - - 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(TextPageDataEntityView, 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, TextPageDataEntityView): - 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/text_page_data_rule_chain.py b/tb_rest_client/models/models_ce/text_page_data_rule_chain.py deleted file mode 100644 index 8b2605f0..00000000 --- a/tb_rest_client/models/models_ce/text_page_data_rule_chain.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TextPageDataRuleChain(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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[RuleChain]', - 'has_next': 'bool', - 'next_page_link': 'TextPageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TextPageDataRuleChain - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TextPageDataRuleChain. # noqa: E501 - - - :return: The data of this TextPageDataRuleChain. # noqa: E501 - :rtype: list[RuleChain] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TextPageDataRuleChain. - - - :param data: The data of this TextPageDataRuleChain. # noqa: E501 - :type: list[RuleChain] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TextPageDataRuleChain. # noqa: E501 - - - :return: The has_next of this TextPageDataRuleChain. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TextPageDataRuleChain. - - - :param has_next: The has_next of this TextPageDataRuleChain. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TextPageDataRuleChain. # noqa: E501 - - - :return: The next_page_link of this TextPageDataRuleChain. # noqa: E501 - :rtype: TextPageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TextPageDataRuleChain. - - - :param next_page_link: The next_page_link of this TextPageDataRuleChain. # noqa: E501 - :type: TextPageLink - """ - - self._next_page_link = next_page_link - - 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(TextPageDataRuleChain, 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, TextPageDataRuleChain): - 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/text_page_data_tenant.py b/tb_rest_client/models/models_ce/text_page_data_tenant.py deleted file mode 100644 index f4e0ab81..00000000 --- a/tb_rest_client/models/models_ce/text_page_data_tenant.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TextPageDataTenant(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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[Tenant]', - 'has_next': 'bool', - 'next_page_link': 'TextPageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TextPageDataTenant - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TextPageDataTenant. # noqa: E501 - - - :return: The data of this TextPageDataTenant. # noqa: E501 - :rtype: list[Tenant] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TextPageDataTenant. - - - :param data: The data of this TextPageDataTenant. # noqa: E501 - :type: list[Tenant] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TextPageDataTenant. # noqa: E501 - - - :return: The has_next of this TextPageDataTenant. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TextPageDataTenant. - - - :param has_next: The has_next of this TextPageDataTenant. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TextPageDataTenant. # noqa: E501 - - - :return: The next_page_link of this TextPageDataTenant. # noqa: E501 - :rtype: TextPageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TextPageDataTenant. - - - :param next_page_link: The next_page_link of this TextPageDataTenant. # noqa: E501 - :type: TextPageLink - """ - - self._next_page_link = next_page_link - - 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(TextPageDataTenant, 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, TextPageDataTenant): - 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/text_page_data_user.py b/tb_rest_client/models/models_ce/text_page_data_user.py deleted file mode 100644 index 3e4452c0..00000000 --- a/tb_rest_client/models/models_ce/text_page_data_user.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TextPageDataUser(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'next_page_link': 'TextPageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TextPageDataUser - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TextPageDataUser. # noqa: E501 - - - :return: The data of this TextPageDataUser. # noqa: E501 - :rtype: list[User] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TextPageDataUser. - - - :param data: The data of this TextPageDataUser. # noqa: E501 - :type: list[User] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TextPageDataUser. # noqa: E501 - - - :return: The has_next of this TextPageDataUser. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TextPageDataUser. - - - :param has_next: The has_next of this TextPageDataUser. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TextPageDataUser. # noqa: E501 - - - :return: The next_page_link of this TextPageDataUser. # noqa: E501 - :rtype: TextPageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TextPageDataUser. - - - :param next_page_link: The next_page_link of this TextPageDataUser. # noqa: E501 - :type: TextPageLink - """ - - self._next_page_link = next_page_link - - 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(TextPageDataUser, 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, TextPageDataUser): - 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/text_page_data_widgets_bundle.py b/tb_rest_client/models/models_ce/text_page_data_widgets_bundle.py deleted file mode 100644 index b9615e1a..00000000 --- a/tb_rest_client/models/models_ce/text_page_data_widgets_bundle.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TextPageDataWidgetsBundle(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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[WidgetsBundle]', - 'has_next': 'bool', - 'next_page_link': 'TextPageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TextPageDataWidgetsBundle - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TextPageDataWidgetsBundle. # noqa: E501 - - - :return: The data of this TextPageDataWidgetsBundle. # noqa: E501 - :rtype: list[WidgetsBundle] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TextPageDataWidgetsBundle. - - - :param data: The data of this TextPageDataWidgetsBundle. # noqa: E501 - :type: list[WidgetsBundle] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TextPageDataWidgetsBundle. # noqa: E501 - - - :return: The has_next of this TextPageDataWidgetsBundle. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TextPageDataWidgetsBundle. - - - :param has_next: The has_next of this TextPageDataWidgetsBundle. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TextPageDataWidgetsBundle. # noqa: E501 - - - :return: The next_page_link of this TextPageDataWidgetsBundle. # noqa: E501 - :rtype: TextPageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TextPageDataWidgetsBundle. - - - :param next_page_link: The next_page_link of this TextPageDataWidgetsBundle. # noqa: E501 - :type: TextPageLink - """ - - self._next_page_link = next_page_link - - 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(TextPageDataWidgetsBundle, 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, TextPageDataWidgetsBundle): - 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/text_page_link.py b/tb_rest_client/models/models_ce/text_page_link.py deleted file mode 100644 index 9aabaaa7..00000000 --- a/tb_rest_client/models/models_ce/text_page_link.py +++ /dev/null @@ -1,220 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TextPageLink(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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_offset': 'str', - 'limit': 'int', - 'text_offset': 'str', - 'text_search': 'str', - 'text_search_bound': 'str' - } - - attribute_map = { - 'id_offset': 'idOffset', - 'limit': 'limit', - 'text_offset': 'textOffset', - 'text_search': 'textSearch', - 'text_search_bound': 'textSearchBound' - } - - def __init__(self, id_offset=None, limit=None, text_offset=None, text_search=None, text_search_bound=None): # noqa: E501 - """TextPageLink - a model defined in Swagger""" # noqa: E501 - - self._id_offset = None - self._limit = None - self._text_offset = None - self._text_search = None - self._text_search_bound = None - self.discriminator = None - - if id_offset is not None: - self.id_offset = id_offset - if limit is not None: - self.limit = limit - if text_offset is not None: - self.text_offset = text_offset - if text_search is not None: - self.text_search = text_search - if text_search_bound is not None: - self.text_search_bound = text_search_bound - - @property - def id_offset(self): - """Gets the id_offset of this TextPageLink. # noqa: E501 - - - :return: The id_offset of this TextPageLink. # noqa: E501 - :rtype: str - """ - return self._id_offset - - @id_offset.setter - def id_offset(self, id_offset): - """Sets the id_offset of this TextPageLink. - - - :param id_offset: The id_offset of this TextPageLink. # noqa: E501 - :type: str - """ - - self._id_offset = id_offset - - @property - def limit(self): - """Gets the limit of this TextPageLink. # noqa: E501 - - - :return: The limit of this TextPageLink. # noqa: E501 - :rtype: int - """ - return self._limit - - @limit.setter - def limit(self, limit): - """Sets the limit of this TextPageLink. - - - :param limit: The limit of this TextPageLink. # noqa: E501 - :type: int - """ - - self._limit = limit - - @property - def text_offset(self): - """Gets the text_offset of this TextPageLink. # noqa: E501 - - - :return: The text_offset of this TextPageLink. # noqa: E501 - :rtype: str - """ - return self._text_offset - - @text_offset.setter - def text_offset(self, text_offset): - """Sets the text_offset of this TextPageLink. - - - :param text_offset: The text_offset of this TextPageLink. # noqa: E501 - :type: str - """ - - self._text_offset = text_offset - - @property - def text_search(self): - """Gets the text_search of this TextPageLink. # noqa: E501 - - - :return: The text_search of this TextPageLink. # noqa: E501 - :rtype: str - """ - return self._text_search - - @text_search.setter - def text_search(self, text_search): - """Sets the text_search of this TextPageLink. - - - :param text_search: The text_search of this TextPageLink. # noqa: E501 - :type: str - """ - - self._text_search = text_search - - @property - def text_search_bound(self): - """Gets the text_search_bound of this TextPageLink. # noqa: E501 - - - :return: The text_search_bound of this TextPageLink. # noqa: E501 - :rtype: str - """ - return self._text_search_bound - - @text_search_bound.setter - def text_search_bound(self, text_search_bound): - """Sets the text_search_bound of this TextPageLink. - - - :param text_search_bound: The text_search_bound of this TextPageLink. # noqa: E501 - :type: str - """ - - self._text_search_bound = text_search_bound - - 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(TextPageLink, 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, TextPageLink): - 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/time_page_data_alarm_info.py b/tb_rest_client/models/models_ce/time_page_data_alarm_info.py deleted file mode 100644 index a45facd9..00000000 --- a/tb_rest_client/models/models_ce/time_page_data_alarm_info.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TimePageDataAlarmInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'next_page_link': 'TimePageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TimePageDataAlarmInfo - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TimePageDataAlarmInfo. # noqa: E501 - - - :return: The data of this TimePageDataAlarmInfo. # noqa: E501 - :rtype: list[AlarmInfo] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TimePageDataAlarmInfo. - - - :param data: The data of this TimePageDataAlarmInfo. # noqa: E501 - :type: list[AlarmInfo] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TimePageDataAlarmInfo. # noqa: E501 - - - :return: The has_next of this TimePageDataAlarmInfo. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TimePageDataAlarmInfo. - - - :param has_next: The has_next of this TimePageDataAlarmInfo. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TimePageDataAlarmInfo. # noqa: E501 - - - :return: The next_page_link of this TimePageDataAlarmInfo. # noqa: E501 - :rtype: TimePageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TimePageDataAlarmInfo. - - - :param next_page_link: The next_page_link of this TimePageDataAlarmInfo. # noqa: E501 - :type: TimePageLink - """ - - self._next_page_link = next_page_link - - 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(TimePageDataAlarmInfo, 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, TimePageDataAlarmInfo): - 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/time_page_data_audit_log.py b/tb_rest_client/models/models_ce/time_page_data_audit_log.py deleted file mode 100644 index 0ac9ccb6..00000000 --- a/tb_rest_client/models/models_ce/time_page_data_audit_log.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TimePageDataAuditLog(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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[AuditLog]', - 'has_next': 'bool', - 'next_page_link': 'TimePageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TimePageDataAuditLog - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TimePageDataAuditLog. # noqa: E501 - - - :return: The data of this TimePageDataAuditLog. # noqa: E501 - :rtype: list[AuditLog] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TimePageDataAuditLog. - - - :param data: The data of this TimePageDataAuditLog. # noqa: E501 - :type: list[AuditLog] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TimePageDataAuditLog. # noqa: E501 - - - :return: The has_next of this TimePageDataAuditLog. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TimePageDataAuditLog. - - - :param has_next: The has_next of this TimePageDataAuditLog. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TimePageDataAuditLog. # noqa: E501 - - - :return: The next_page_link of this TimePageDataAuditLog. # noqa: E501 - :rtype: TimePageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TimePageDataAuditLog. - - - :param next_page_link: The next_page_link of this TimePageDataAuditLog. # noqa: E501 - :type: TimePageLink - """ - - self._next_page_link = next_page_link - - 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(TimePageDataAuditLog, 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, TimePageDataAuditLog): - 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/time_page_data_dashboard_info.py b/tb_rest_client/models/models_ce/time_page_data_dashboard_info.py deleted file mode 100644 index a130f89e..00000000 --- a/tb_rest_client/models/models_ce/time_page_data_dashboard_info.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TimePageDataDashboardInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'next_page_link': 'TimePageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TimePageDataDashboardInfo - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TimePageDataDashboardInfo. # noqa: E501 - - - :return: The data of this TimePageDataDashboardInfo. # noqa: E501 - :rtype: list[DashboardInfo] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TimePageDataDashboardInfo. - - - :param data: The data of this TimePageDataDashboardInfo. # noqa: E501 - :type: list[DashboardInfo] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TimePageDataDashboardInfo. # noqa: E501 - - - :return: The has_next of this TimePageDataDashboardInfo. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TimePageDataDashboardInfo. - - - :param has_next: The has_next of this TimePageDataDashboardInfo. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TimePageDataDashboardInfo. # noqa: E501 - - - :return: The next_page_link of this TimePageDataDashboardInfo. # noqa: E501 - :rtype: TimePageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TimePageDataDashboardInfo. - - - :param next_page_link: The next_page_link of this TimePageDataDashboardInfo. # noqa: E501 - :type: TimePageLink - """ - - self._next_page_link = next_page_link - - 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(TimePageDataDashboardInfo, 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, TimePageDataDashboardInfo): - 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/time_page_data_event.py b/tb_rest_client/models/models_ce/time_page_data_event.py deleted file mode 100644 index 274e495b..00000000 --- a/tb_rest_client/models/models_ce/time_page_data_event.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TimePageDataEvent(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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[Event]', - 'has_next': 'bool', - 'next_page_link': 'TimePageLink' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'next_page_link': 'nextPageLink' - } - - def __init__(self, data=None, has_next=None, next_page_link=None): # noqa: E501 - """TimePageDataEvent - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._next_page_link = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if next_page_link is not None: - self.next_page_link = next_page_link - - @property - def data(self): - """Gets the data of this TimePageDataEvent. # noqa: E501 - - - :return: The data of this TimePageDataEvent. # noqa: E501 - :rtype: list[Event] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TimePageDataEvent. - - - :param data: The data of this TimePageDataEvent. # noqa: E501 - :type: list[Event] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this TimePageDataEvent. # noqa: E501 - - - :return: The has_next of this TimePageDataEvent. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this TimePageDataEvent. - - - :param has_next: The has_next of this TimePageDataEvent. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def next_page_link(self): - """Gets the next_page_link of this TimePageDataEvent. # noqa: E501 - - - :return: The next_page_link of this TimePageDataEvent. # noqa: E501 - :rtype: TimePageLink - """ - return self._next_page_link - - @next_page_link.setter - def next_page_link(self, next_page_link): - """Sets the next_page_link of this TimePageDataEvent. - - - :param next_page_link: The next_page_link of this TimePageDataEvent. # noqa: E501 - :type: TimePageLink - """ - - self._next_page_link = next_page_link - - 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(TimePageDataEvent, 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, TimePageDataEvent): - 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/time_page_link.py b/tb_rest_client/models/models_ce/time_page_link.py deleted file mode 100644 index 947954f7..00000000 --- a/tb_rest_client/models/models_ce/time_page_link.py +++ /dev/null @@ -1,220 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class TimePageLink(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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 = { - 'asc_order': 'bool', - 'end_time': 'int', - 'id_offset': 'str', - 'limit': 'int', - 'start_time': 'int' - } - - attribute_map = { - 'asc_order': 'ascOrder', - 'end_time': 'endTime', - 'id_offset': 'idOffset', - 'limit': 'limit', - 'start_time': 'startTime' - } - - def __init__(self, asc_order=None, end_time=None, id_offset=None, limit=None, start_time=None): # noqa: E501 - """TimePageLink - a model defined in Swagger""" # noqa: E501 - - self._asc_order = None - self._end_time = None - self._id_offset = None - self._limit = None - self._start_time = None - self.discriminator = None - - if asc_order is not None: - self.asc_order = asc_order - if end_time is not None: - self.end_time = end_time - if id_offset is not None: - self.id_offset = id_offset - if limit is not None: - self.limit = limit - if start_time is not None: - self.start_time = start_time - - @property - def asc_order(self): - """Gets the asc_order of this TimePageLink. # noqa: E501 - - - :return: The asc_order of this TimePageLink. # noqa: E501 - :rtype: bool - """ - return self._asc_order - - @asc_order.setter - def asc_order(self, asc_order): - """Sets the asc_order of this TimePageLink. - - - :param asc_order: The asc_order of this TimePageLink. # noqa: E501 - :type: bool - """ - - self._asc_order = asc_order - - @property - def end_time(self): - """Gets the end_time of this TimePageLink. # noqa: E501 - - - :return: The end_time of this TimePageLink. # noqa: E501 - :rtype: int - """ - return self._end_time - - @end_time.setter - def end_time(self, end_time): - """Sets the end_time of this TimePageLink. - - - :param end_time: The end_time of this TimePageLink. # noqa: E501 - :type: int - """ - - self._end_time = end_time - - @property - def id_offset(self): - """Gets the id_offset of this TimePageLink. # noqa: E501 - - - :return: The id_offset of this TimePageLink. # noqa: E501 - :rtype: str - """ - return self._id_offset - - @id_offset.setter - def id_offset(self, id_offset): - """Sets the id_offset of this TimePageLink. - - - :param id_offset: The id_offset of this TimePageLink. # noqa: E501 - :type: str - """ - - self._id_offset = id_offset - - @property - def limit(self): - """Gets the limit of this TimePageLink. # noqa: E501 - - - :return: The limit of this TimePageLink. # noqa: E501 - :rtype: int - """ - return self._limit - - @limit.setter - def limit(self, limit): - """Sets the limit of this TimePageLink. - - - :param limit: The limit of this TimePageLink. # noqa: E501 - :type: int - """ - - self._limit = limit - - @property - def start_time(self): - """Gets the start_time of this TimePageLink. # noqa: E501 - - - :return: The start_time of this TimePageLink. # noqa: E501 - :rtype: int - """ - return self._start_time - - @start_time.setter - def start_time(self, start_time): - """Sets the start_time of this TimePageLink. - - - :param start_time: The start_time of this TimePageLink. # noqa: E501 - :type: int - """ - - self._start_time = start_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(TimePageLink, 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, TimePageLink): - 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 2dd2ba59..0eb9e25e 100644 --- a/tb_rest_client/models/models_ce/user_id.py +++ b/tb_rest_client/models/models_ce/user_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class UserId(object): + +class UserId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class UserId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """UserId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_pe/asset_id.py b/tb_rest_client/models/models_pe/asset_id.py index bfcf9129..882bdbf3 100644 --- a/tb_rest_client/models/models_pe/asset_id.py +++ b/tb_rest_client/models/models_pe/asset_id.py @@ -15,7 +15,10 @@ import six -class AssetId(object): +from . import EntityId + + +class AssetId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,19 +30,10 @@ class AssetId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """AssetId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - self.id = id + super().__init__(entity_type, id) @property def id(self): 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 2b625e2f..1d719e78 100644 --- a/tb_rest_client/models/models_pe/blob_entity_id.py +++ b/tb_rest_client/models/models_pe/blob_entity_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class BlobEntityId(object): + +class BlobEntityId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class BlobEntityId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """BlobEntityId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_pe/converter_id.py b/tb_rest_client/models/models_pe/converter_id.py index 9eddd6de..b2285f24 100644 --- a/tb_rest_client/models/models_pe/converter_id.py +++ b/tb_rest_client/models/models_pe/converter_id.py @@ -15,7 +15,10 @@ import six -class ConverterId(object): +from . import EntityId + + +class ConverterId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,19 +30,10 @@ class ConverterId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """ConverterId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_pe/device_profile.py b/tb_rest_client/models/models_pe/device_profile.py deleted file mode 100644 index 376502cf..00000000 --- a/tb_rest_client/models/models_pe/device_profile.py +++ /dev/null @@ -1,457 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -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 = { - 'created_time': 'int', - 'default': 'bool', - 'default_queue_name': 'str', - 'default_rule_chain_id': 'RuleChainId', - 'description': 'str', - 'id': 'DeviceProfileId', - 'name': 'str', - 'profile_data': 'DeviceProfileData', - 'provision_device_key': 'str', - 'provision_type': 'str', - 'tenant_id': 'TenantId', - 'transport_type': 'str', - 'type': 'str' - } - - attribute_map = { - 'created_time': 'createdTime', - 'default': 'default', - 'default_queue_name': 'defaultQueueName', - 'default_rule_chain_id': 'defaultRuleChainId', - 'description': 'description', - 'id': 'id', - 'name': 'name', - 'profile_data': 'profileData', - 'provision_device_key': 'provisionDeviceKey', - 'provision_type': 'provisionType', - 'tenant_id': 'tenantId', - 'transport_type': 'transportType', - 'type': 'type' - } - - def __init__(self, created_time=None, default=None, default_queue_name=None, default_rule_chain_id=None, description=None, id=None, name=None, profile_data=None, provision_device_key=None, provision_type=None, tenant_id=None, transport_type=None, type=None, _configuration=None): # noqa: E501 - """DeviceProfile - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._created_time = None - self._default = None - self._default_queue_name = None - self._default_rule_chain_id = None - self._description = None - self._id = None - self._name = None - self._profile_data = None - self._provision_device_key = None - self._provision_type = None - self._tenant_id = None - self._transport_type = None - self._type = None - self.discriminator = None - - if created_time is not None: - self.created_time = created_time - if default is not None: - self.default = default - if default_queue_name is not None: - self.default_queue_name = default_queue_name - if default_rule_chain_id is not None: - self.default_rule_chain_id = default_rule_chain_id - if description is not None: - self.description = description - if id is not None: - self.id = id - if name is not None: - self.name = name - if profile_data is not None: - self.profile_data = profile_data - if provision_device_key is not None: - self.provision_device_key = provision_device_key - if provision_type is not None: - self.provision_type = provision_type - if tenant_id is not None: - self.tenant_id = tenant_id - if transport_type is not None: - self.transport_type = transport_type - if type is not None: - self.type = type - - @property - def created_time(self): - """Gets the created_time of this DeviceProfile. # 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. - - - :param created_time: The created_time of this DeviceProfile. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def default(self): - """Gets the default of this DeviceProfile. # 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. - - - :param default: The default of this DeviceProfile. # noqa: E501 - :type: bool - """ - - self._default = default - - @property - def default_queue_name(self): - """Gets the default_queue_name of this DeviceProfile. # 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. - - - :param default_queue_name: The default_queue_name of this DeviceProfile. # noqa: E501 - :type: str - """ - - self._default_queue_name = default_queue_name - - @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 description(self): - """Gets the description of this DeviceProfile. # 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. - - - :param description: The description of this DeviceProfile. # noqa: E501 - :type: str - """ - - self._description = description - - @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 name(self): - """Gets the name of this DeviceProfile. # 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. - - - :param name: The name of this DeviceProfile. # noqa: E501 - :type: str - """ - - self._name = name - - @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 provision_device_key(self): - """Gets the provision_device_key of this DeviceProfile. # 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. - - - :param provision_device_key: The provision_device_key of this DeviceProfile. # noqa: E501 - :type: str - """ - - self._provision_device_key = provision_device_key - - @property - def provision_type(self): - """Gets the provision_type of this DeviceProfile. # 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. - - - :param provision_type: The provision_type of this DeviceProfile. # noqa: E501 - :type: str - """ - allowed_values = ["DISABLED", "ALLOW_CREATE_NEW_DEVICES", "CHECK_PRE_PROVISIONED_DEVICES"] # noqa: E501 - if (self._configuration.client_side_validation and - 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 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 transport_type(self): - """Gets the transport_type of this DeviceProfile. # 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. - - - :param transport_type: The transport_type of this DeviceProfile. # noqa: E501 - :type: str - """ - allowed_values = ["DEFAULT", "MQTT", "LWM2M", "COAP"] # noqa: E501 - if (self._configuration.client_side_validation and - 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 type(self): - """Gets the type of this DeviceProfile. # 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. - - - :param type: The type of this DeviceProfile. # noqa: E501 - :type: str - """ - allowed_values = ["DEFAULT"] # noqa: E501 - if (self._configuration.client_side_validation and - 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(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.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, DeviceProfile): - return True - - return self.to_dict() != other.to_dict() 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 4bbe28b0..2a0a90ca 100644 --- a/tb_rest_client/models/models_pe/entity_group_id.py +++ b/tb_rest_client/models/models_pe/entity_group_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class EntityGroupId(object): + +class EntityGroupId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class EntityGroupId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """EntityGroupId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_pe/entity_type_filter.py b/tb_rest_client/models/models_pe/entity_type_filter.py deleted file mode 100644 index da0dc510..00000000 --- a/tb_rest_client/models/models_pe/entity_type_filter.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class EntityTypeFilter(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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 = { - 'relation_type': 'str', - 'entity_types': 'list[str]' - } - - attribute_map = { - 'relation_type': 'relationType', - 'entity_types': 'entityTypes' - } - - def __init__(self, relation_type=None, entity_types=None): # noqa: E501 - """EntityTypeFilter - a model defined in Swagger""" # noqa: E501 - - self._relation_type = None - self._entity_types = None - self.discriminator = None - - self.relation_type = relation_type - self.entity_types = entity_types - - @property - def relation_type(self): - """Gets the relation_type of this EntityTypeFilter. # noqa: E501 - - - :return: The relation_type of this EntityTypeFilter. # noqa: E501 - :rtype: str - """ - return self._relation_type - - @relation_type.setter - def relation_type(self, relation_type): - """Sets the relation_type of this EntityTypeFilter. - - - :param relation_type: The relation_type of this EntityTypeFilter. # noqa: E501 - :type: str - """ - if relation_type is None: - raise ValueError("Invalid value for `relation_type`, must not be `None`") # noqa: E501 - - self._relation_type = relation_type - - @property - def entity_types(self): - """Gets the entity_types of this EntityTypeFilter. # noqa: E501 - - - :return: The entity_types of this EntityTypeFilter. # noqa: E501 - :rtype: list[str] - """ - return self._entity_types - - @entity_types.setter - def entity_types(self, entity_types): - """Sets the entity_types of this EntityTypeFilter. - - - :param entity_types: The entity_types of this EntityTypeFilter. # noqa: E501 - :type: list[str] - """ - if entity_types is None: - raise ValueError("Invalid value for `entity_types`, must not be `None`") # noqa: E501 - allowed_values = ["TENANT", "CUSTOMER", "USER", "DASHBOARD", "ASSET", "DEVICE", "ALARM", "ENTITY_GROUP", "CONVERTER", "INTEGRATION", "RULE_CHAIN", "RULE_NODE", "SCHEDULER_EVENT", "BLOB_ENTITY", "ENTITY_VIEW", "WIDGETS_BUNDLE", "WIDGET_TYPE", "ROLE", "GROUP_PERMISSION"] # 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 - - 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(EntityTypeFilter, 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, EntityTypeFilter): - 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/file.py b/tb_rest_client/models/models_pe/file.py deleted file mode 100644 index 5c23b217..00000000 --- a/tb_rest_client/models/models_pe/file.py +++ /dev/null @@ -1,480 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class File(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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', - 'absolute_file': 'file', - 'absolute_path': 'str', - 'canonical_file': 'file', - 'canonical_path': 'str', - 'directory': 'bool', - 'file': 'bool', - 'free_space': 'int', - 'hidden': 'bool', - 'name': 'str', - 'parent': 'str', - 'parent_file': 'file', - 'path': 'str', - 'total_space': 'int', - 'usable_space': 'int' - } - - attribute_map = { - 'absolute': 'absolute', - 'absolute_file': 'absoluteFile', - 'absolute_path': 'absolutePath', - 'canonical_file': 'canonicalFile', - 'canonical_path': 'canonicalPath', - 'directory': 'directory', - 'file': 'file', - 'free_space': 'freeSpace', - 'hidden': 'hidden', - 'name': 'name', - 'parent': 'parent', - 'parent_file': 'parentFile', - 'path': 'path', - 'total_space': 'totalSpace', - 'usable_space': 'usableSpace' - } - - def __init__(self, absolute=None, absolute_file=None, absolute_path=None, canonical_file=None, canonical_path=None, directory=None, file=None, free_space=None, hidden=None, name=None, parent=None, parent_file=None, path=None, total_space=None, usable_space=None): # noqa: E501 - """File - a model defined in Swagger""" # noqa: E501 - - self._absolute = None - self._absolute_file = None - self._absolute_path = None - self._canonical_file = None - self._canonical_path = None - self._directory = None - self._file = None - self._free_space = None - self._hidden = None - self._name = None - self._parent = None - self._parent_file = None - self._path = None - self._total_space = None - self._usable_space = None - self.discriminator = None - - if absolute is not None: - self.absolute = absolute - if absolute_file is not None: - self.absolute_file = absolute_file - if absolute_path is not None: - self.absolute_path = absolute_path - if canonical_file is not None: - self.canonical_file = canonical_file - if canonical_path is not None: - self.canonical_path = canonical_path - if directory is not None: - self.directory = directory - if file is not None: - self.file = file - if free_space is not None: - self.free_space = free_space - if hidden is not None: - self.hidden = hidden - if name is not None: - self.name = name - if parent is not None: - self.parent = parent - if parent_file is not None: - self.parent_file = parent_file - if path is not None: - self.path = path - if total_space is not None: - self.total_space = total_space - if usable_space is not None: - self.usable_space = usable_space - - @property - def absolute(self): - """Gets the absolute of this File. # noqa: E501 - - - :return: The absolute of this File. # noqa: E501 - :rtype: bool - """ - return self._absolute - - @absolute.setter - def absolute(self, absolute): - """Sets the absolute of this File. - - - :param absolute: The absolute of this File. # noqa: E501 - :type: bool - """ - - self._absolute = absolute - - @property - def absolute_file(self): - """Gets the absolute_file of this File. # noqa: E501 - - - :return: The absolute_file of this File. # noqa: E501 - :rtype: file - """ - return self._absolute_file - - @absolute_file.setter - def absolute_file(self, absolute_file): - """Sets the absolute_file of this File. - - - :param absolute_file: The absolute_file of this File. # noqa: E501 - :type: file - """ - - self._absolute_file = absolute_file - - @property - def absolute_path(self): - """Gets the absolute_path of this File. # noqa: E501 - - - :return: The absolute_path of this File. # noqa: E501 - :rtype: str - """ - return self._absolute_path - - @absolute_path.setter - def absolute_path(self, absolute_path): - """Sets the absolute_path of this File. - - - :param absolute_path: The absolute_path of this File. # noqa: E501 - :type: str - """ - - self._absolute_path = absolute_path - - @property - def canonical_file(self): - """Gets the canonical_file of this File. # noqa: E501 - - - :return: The canonical_file of this File. # noqa: E501 - :rtype: file - """ - return self._canonical_file - - @canonical_file.setter - def canonical_file(self, canonical_file): - """Sets the canonical_file of this File. - - - :param canonical_file: The canonical_file of this File. # noqa: E501 - :type: file - """ - - self._canonical_file = canonical_file - - @property - def canonical_path(self): - """Gets the canonical_path of this File. # noqa: E501 - - - :return: The canonical_path of this File. # noqa: E501 - :rtype: str - """ - return self._canonical_path - - @canonical_path.setter - def canonical_path(self, canonical_path): - """Sets the canonical_path of this File. - - - :param canonical_path: The canonical_path of this File. # noqa: E501 - :type: str - """ - - self._canonical_path = canonical_path - - @property - def directory(self): - """Gets the directory of this File. # noqa: E501 - - - :return: The directory of this File. # noqa: E501 - :rtype: bool - """ - return self._directory - - @directory.setter - def directory(self, directory): - """Sets the directory of this File. - - - :param directory: The directory of this File. # noqa: E501 - :type: bool - """ - - self._directory = directory - - @property - def file(self): - """Gets the file of this File. # noqa: E501 - - - :return: The file of this File. # noqa: E501 - :rtype: bool - """ - return self._file - - @file.setter - def file(self, file): - """Sets the file of this File. - - - :param file: The file of this File. # noqa: E501 - :type: bool - """ - - self._file = file - - @property - def free_space(self): - """Gets the free_space of this File. # noqa: E501 - - - :return: The free_space of this File. # noqa: E501 - :rtype: int - """ - return self._free_space - - @free_space.setter - def free_space(self, free_space): - """Sets the free_space of this File. - - - :param free_space: The free_space of this File. # noqa: E501 - :type: int - """ - - self._free_space = free_space - - @property - def hidden(self): - """Gets the hidden of this File. # noqa: E501 - - - :return: The hidden of this File. # noqa: E501 - :rtype: bool - """ - return self._hidden - - @hidden.setter - def hidden(self, hidden): - """Sets the hidden of this File. - - - :param hidden: The hidden of this File. # noqa: E501 - :type: bool - """ - - self._hidden = hidden - - @property - def name(self): - """Gets the name of this File. # noqa: E501 - - - :return: The name of this File. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this File. - - - :param name: The name of this File. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def parent(self): - """Gets the parent of this File. # noqa: E501 - - - :return: The parent of this File. # noqa: E501 - :rtype: str - """ - return self._parent - - @parent.setter - def parent(self, parent): - """Sets the parent of this File. - - - :param parent: The parent of this File. # noqa: E501 - :type: str - """ - - self._parent = parent - - @property - def parent_file(self): - """Gets the parent_file of this File. # noqa: E501 - - - :return: The parent_file of this File. # noqa: E501 - :rtype: file - """ - return self._parent_file - - @parent_file.setter - def parent_file(self, parent_file): - """Sets the parent_file of this File. - - - :param parent_file: The parent_file of this File. # noqa: E501 - :type: file - """ - - self._parent_file = parent_file - - @property - def path(self): - """Gets the path of this File. # noqa: E501 - - - :return: The path of this File. # noqa: E501 - :rtype: str - """ - return self._path - - @path.setter - def path(self, path): - """Sets the path of this File. - - - :param path: The path of this File. # noqa: E501 - :type: str - """ - - self._path = path - - @property - def total_space(self): - """Gets the total_space of this File. # noqa: E501 - - - :return: The total_space of this File. # noqa: E501 - :rtype: int - """ - return self._total_space - - @total_space.setter - def total_space(self, total_space): - """Sets the total_space of this File. - - - :param total_space: The total_space of this File. # noqa: E501 - :type: int - """ - - self._total_space = total_space - - @property - def usable_space(self): - """Gets the usable_space of this File. # noqa: E501 - - - :return: The usable_space of this File. # noqa: E501 - :rtype: int - """ - return self._usable_space - - @usable_space.setter - def usable_space(self, usable_space): - """Sets the usable_space of this File. - - - :param usable_space: The usable_space of this File. # noqa: E501 - :type: int - """ - - self._usable_space = usable_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(File, 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, File): - 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 deleted file mode 100644 index 4eb99ccc..00000000 --- a/tb_rest_client/models/models_pe/input_stream.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class InputStream(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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 - """InputStream - 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(InputStream, 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, InputStream): - 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_id.py b/tb_rest_client/models/models_pe/integration_id.py index 3436d1b8..7997a273 100644 --- a/tb_rest_client/models/models_pe/integration_id.py +++ b/tb_rest_client/models/models_pe/integration_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class IntegrationId(object): + +class IntegrationId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,19 +29,11 @@ class IntegrationId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """IntegrationId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - self.id = id + super().__init__(entity_type, id) + # self.entity_type = entity_type @property def id(self): 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 deleted file mode 100644 index 8a360d50..00000000 --- a/tb_rest_client/models/models_pe/page_data_alarm_info.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class PageDataAlarmInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'total_elements': 'int', - 'total_pages': 'int' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'total_elements': 'totalElements', - 'total_pages': 'totalPages' - } - - def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 - """PageDataAlarmInfo - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._total_elements = None - self._total_pages = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if total_elements is not None: - self.total_elements = total_elements - if total_pages is not None: - self.total_pages = total_pages - - @property - def data(self): - """Gets the data of this PageDataAlarmInfo. # 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. - - - :param data: The data of this PageDataAlarmInfo. # noqa: E501 - :type: list[AlarmInfo] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this PageDataAlarmInfo. # 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. - - - :param has_next: The has_next of this PageDataAlarmInfo. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def total_elements(self): - """Gets the total_elements of this PageDataAlarmInfo. # 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. - - - :param total_elements: The total_elements of this PageDataAlarmInfo. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def total_pages(self): - """Gets the total_pages of this PageDataAlarmInfo. # 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. - - - :param total_pages: The total_pages of this PageDataAlarmInfo. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - 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 deleted file mode 100644 index a823e457..00000000 --- a/tb_rest_client/models/models_pe/page_data_asset.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class PageDataAsset(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'total_elements': 'int', - 'total_pages': 'int' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'total_elements': 'totalElements', - 'total_pages': 'totalPages' - } - - def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 - """PageDataAsset - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._total_elements = None - self._total_pages = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if total_elements is not None: - self.total_elements = total_elements - if total_pages is not None: - self.total_pages = total_pages - - @property - def data(self): - """Gets the data of this PageDataAsset. # 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. - - - :param data: The data of this PageDataAsset. # noqa: E501 - :type: list[Asset] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this PageDataAsset. # 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. - - - :param has_next: The has_next of this PageDataAsset. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def total_elements(self): - """Gets the total_elements of this PageDataAsset. # 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. - - - :param total_elements: The total_elements of this PageDataAsset. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def total_pages(self): - """Gets the total_pages of this PageDataAsset. # 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. - - - :param total_pages: The total_pages of this PageDataAsset. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - 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_audit_log.py b/tb_rest_client/models/models_pe/page_data_audit_log.py deleted file mode 100644 index 54f242b1..00000000 --- a/tb_rest_client/models/models_pe/page_data_audit_log.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class PageDataAuditLog(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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[AuditLog]', - 'has_next': 'bool', - 'total_elements': 'int', - 'total_pages': 'int' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'total_elements': 'totalElements', - 'total_pages': 'totalPages' - } - - def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 - """PageDataAuditLog - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._total_elements = None - self._total_pages = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if total_elements is not None: - self.total_elements = total_elements - if total_pages is not None: - self.total_pages = total_pages - - @property - def data(self): - """Gets the data of this PageDataAuditLog. # noqa: E501 - - - :return: The data of this PageDataAuditLog. # noqa: E501 - :rtype: list[AuditLog] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataAuditLog. - - - :param data: The data of this PageDataAuditLog. # noqa: E501 - :type: list[AuditLog] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this PageDataAuditLog. # noqa: E501 - - - :return: The has_next of this PageDataAuditLog. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataAuditLog. - - - :param has_next: The has_next of this PageDataAuditLog. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def total_elements(self): - """Gets the total_elements of this PageDataAuditLog. # noqa: E501 - - - :return: The total_elements of this PageDataAuditLog. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataAuditLog. - - - :param total_elements: The total_elements of this PageDataAuditLog. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def total_pages(self): - """Gets the total_pages of this PageDataAuditLog. # noqa: E501 - - - :return: The total_pages of this PageDataAuditLog. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataAuditLog. - - - :param total_pages: The total_pages of this PageDataAuditLog. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - 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(PageDataAuditLog, 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, PageDataAuditLog): - 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.py b/tb_rest_client/models/models_pe/page_data_customer.py deleted file mode 100644 index 62c120cc..00000000 --- a/tb_rest_client/models/models_pe/page_data_customer.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class PageDataCustomer(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'total_elements': 'int', - 'total_pages': 'int' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'total_elements': 'totalElements', - 'total_pages': 'totalPages' - } - - def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 - """PageDataCustomer - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._total_elements = None - self._total_pages = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if total_elements is not None: - self.total_elements = total_elements - if total_pages is not None: - self.total_pages = total_pages - - @property - def data(self): - """Gets the data of this PageDataCustomer. # 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. - - - :param data: The data of this PageDataCustomer. # noqa: E501 - :type: list[Customer] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this PageDataCustomer. # 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. - - - :param has_next: The has_next of this PageDataCustomer. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def total_elements(self): - """Gets the total_elements of this PageDataCustomer. # 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. - - - :param total_elements: The total_elements of this PageDataCustomer. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def total_pages(self): - """Gets the total_pages of this PageDataCustomer. # 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. - - - :param total_pages: The total_pages of this PageDataCustomer. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - 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_dashboard_info.py b/tb_rest_client/models/models_pe/page_data_dashboard_info.py deleted file mode 100644 index 39f25213..00000000 --- a/tb_rest_client/models/models_pe/page_data_dashboard_info.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class PageDataDashboardInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'total_elements': 'int', - 'total_pages': 'int' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'total_elements': 'totalElements', - 'total_pages': 'totalPages' - } - - def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 - """PageDataDashboardInfo - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._total_elements = None - self._total_pages = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if total_elements is not None: - self.total_elements = total_elements - if total_pages is not None: - self.total_pages = total_pages - - @property - def data(self): - """Gets the data of this PageDataDashboardInfo. # 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. - - - :param data: The data of this PageDataDashboardInfo. # noqa: E501 - :type: list[DashboardInfo] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this PageDataDashboardInfo. # 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. - - - :param has_next: The has_next of this PageDataDashboardInfo. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def total_elements(self): - """Gets the total_elements of this PageDataDashboardInfo. # 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. - - - :param total_elements: The total_elements of this PageDataDashboardInfo. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def total_pages(self): - """Gets the total_pages of this PageDataDashboardInfo. # 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. - - - :param total_pages: The total_pages of this PageDataDashboardInfo. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - 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 deleted file mode 100644 index 687e2159..00000000 --- a/tb_rest_client/models/models_pe/page_data_device.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class PageDataDevice(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'total_elements': 'int', - 'total_pages': 'int' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'total_elements': 'totalElements', - 'total_pages': 'totalPages' - } - - def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 - """PageDataDevice - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._total_elements = None - self._total_pages = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if total_elements is not None: - self.total_elements = total_elements - if total_pages is not None: - self.total_pages = total_pages - - @property - def data(self): - """Gets the data of this PageDataDevice. # 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. - - - :param data: The data of this PageDataDevice. # noqa: E501 - :type: list[Device] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this PageDataDevice. # 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. - - - :param has_next: The has_next of this PageDataDevice. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def total_elements(self): - """Gets the total_elements of this PageDataDevice. # 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. - - - :param total_elements: The total_elements of this PageDataDevice. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def total_pages(self): - """Gets the total_pages of this PageDataDevice. # 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. - - - :param total_pages: The total_pages of this PageDataDevice. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - 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_entity_view.py b/tb_rest_client/models/models_pe/page_data_entity_view.py deleted file mode 100644 index 91d453c8..00000000 --- a/tb_rest_client/models/models_pe/page_data_entity_view.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class PageDataEntityView(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'total_elements': 'int', - 'total_pages': 'int' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'total_elements': 'totalElements', - 'total_pages': 'totalPages' - } - - def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 - """PageDataEntityView - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._total_elements = None - self._total_pages = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if total_elements is not None: - self.total_elements = total_elements - if total_pages is not None: - self.total_pages = total_pages - - @property - def data(self): - """Gets the data of this PageDataEntityView. # 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. - - - :param data: The data of this PageDataEntityView. # noqa: E501 - :type: list[EntityView] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this PageDataEntityView. # 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. - - - :param has_next: The has_next of this PageDataEntityView. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def total_elements(self): - """Gets the total_elements of this PageDataEntityView. # 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. - - - :param total_elements: The total_elements of this PageDataEntityView. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def total_pages(self): - """Gets the total_pages of this PageDataEntityView. # 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. - - - :param total_pages: The total_pages of this PageDataEntityView. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - 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_event.py b/tb_rest_client/models/models_pe/page_data_event.py deleted file mode 100644 index 4f2ea6b5..00000000 --- a/tb_rest_client/models/models_pe/page_data_event.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class PageDataEvent(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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[Event]', - 'has_next': 'bool', - 'total_elements': 'int', - 'total_pages': 'int' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'total_elements': 'totalElements', - 'total_pages': 'totalPages' - } - - def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 - """PageDataEvent - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._total_elements = None - self._total_pages = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if total_elements is not None: - self.total_elements = total_elements - if total_pages is not None: - self.total_pages = total_pages - - @property - def data(self): - """Gets the data of this PageDataEvent. # noqa: E501 - - - :return: The data of this PageDataEvent. # noqa: E501 - :rtype: list[Event] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataEvent. - - - :param data: The data of this PageDataEvent. # noqa: E501 - :type: list[Event] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this PageDataEvent. # noqa: E501 - - - :return: The has_next of this PageDataEvent. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataEvent. - - - :param has_next: The has_next of this PageDataEvent. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def total_elements(self): - """Gets the total_elements of this PageDataEvent. # noqa: E501 - - - :return: The total_elements of this PageDataEvent. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataEvent. - - - :param total_elements: The total_elements of this PageDataEvent. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def total_pages(self): - """Gets the total_pages of this PageDataEvent. # noqa: E501 - - - :return: The total_pages of this PageDataEvent. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataEvent. - - - :param total_pages: The total_pages of this PageDataEvent. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - 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(PageDataEvent, 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, PageDataEvent): - 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_rule_chain.py b/tb_rest_client/models/models_pe/page_data_rule_chain.py deleted file mode 100644 index 2f51fe4b..00000000 --- a/tb_rest_client/models/models_pe/page_data_rule_chain.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class PageDataRuleChain(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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[RuleChain]', - 'has_next': 'bool', - 'total_elements': 'int', - 'total_pages': 'int' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'total_elements': 'totalElements', - 'total_pages': 'totalPages' - } - - def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 - """PageDataRuleChain - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._total_elements = None - self._total_pages = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if total_elements is not None: - self.total_elements = total_elements - if total_pages is not None: - self.total_pages = total_pages - - @property - def data(self): - """Gets the data of this PageDataRuleChain. # noqa: E501 - - - :return: The data of this PageDataRuleChain. # noqa: E501 - :rtype: list[RuleChain] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataRuleChain. - - - :param data: The data of this PageDataRuleChain. # noqa: E501 - :type: list[RuleChain] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this PageDataRuleChain. # noqa: E501 - - - :return: The has_next of this PageDataRuleChain. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataRuleChain. - - - :param has_next: The has_next of this PageDataRuleChain. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def total_elements(self): - """Gets the total_elements of this PageDataRuleChain. # noqa: E501 - - - :return: The total_elements of this PageDataRuleChain. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataRuleChain. - - - :param total_elements: The total_elements of this PageDataRuleChain. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def total_pages(self): - """Gets the total_pages of this PageDataRuleChain. # noqa: E501 - - - :return: The total_pages of this PageDataRuleChain. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataRuleChain. - - - :param total_pages: The total_pages of this PageDataRuleChain. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - 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(PageDataRuleChain, 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, PageDataRuleChain): - 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_tenant.py b/tb_rest_client/models/models_pe/page_data_tenant.py deleted file mode 100644 index 82aa6951..00000000 --- a/tb_rest_client/models/models_pe/page_data_tenant.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class PageDataTenant(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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[Tenant]', - 'has_next': 'bool', - 'total_elements': 'int', - 'total_pages': 'int' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'total_elements': 'totalElements', - 'total_pages': 'totalPages' - } - - def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 - """PageDataTenant - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._total_elements = None - self._total_pages = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if total_elements is not None: - self.total_elements = total_elements - if total_pages is not None: - self.total_pages = total_pages - - @property - def data(self): - """Gets the data of this PageDataTenant. # noqa: E501 - - - :return: The data of this PageDataTenant. # noqa: E501 - :rtype: list[Tenant] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataTenant. - - - :param data: The data of this PageDataTenant. # noqa: E501 - :type: list[Tenant] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this PageDataTenant. # noqa: E501 - - - :return: The has_next of this PageDataTenant. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataTenant. - - - :param has_next: The has_next of this PageDataTenant. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def total_elements(self): - """Gets the total_elements of this PageDataTenant. # noqa: E501 - - - :return: The total_elements of this PageDataTenant. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataTenant. - - - :param total_elements: The total_elements of this PageDataTenant. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def total_pages(self): - """Gets the total_pages of this PageDataTenant. # noqa: E501 - - - :return: The total_pages of this PageDataTenant. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataTenant. - - - :param total_pages: The total_pages of this PageDataTenant. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - 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(PageDataTenant, 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, PageDataTenant): - 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.py b/tb_rest_client/models/models_pe/page_data_user.py deleted file mode 100644 index e6f056e4..00000000 --- a/tb_rest_client/models/models_pe/page_data_user.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class PageDataUser(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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]', - 'has_next': 'bool', - 'total_elements': 'int', - 'total_pages': 'int' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'total_elements': 'totalElements', - 'total_pages': 'totalPages' - } - - def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 - """PageDataUser - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._total_elements = None - self._total_pages = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if total_elements is not None: - self.total_elements = total_elements - if total_pages is not None: - self.total_pages = total_pages - - @property - def data(self): - """Gets the data of this PageDataUser. # 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. - - - :param data: The data of this PageDataUser. # noqa: E501 - :type: list[User] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this PageDataUser. # 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. - - - :param has_next: The has_next of this PageDataUser. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def total_elements(self): - """Gets the total_elements of this PageDataUser. # 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. - - - :param total_elements: The total_elements of this PageDataUser. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def total_pages(self): - """Gets the total_pages of this PageDataUser. # 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. - - - :param total_pages: The total_pages of this PageDataUser. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - 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_widgets_bundle.py b/tb_rest_client/models/models_pe/page_data_widgets_bundle.py deleted file mode 100644 index a0d502d3..00000000 --- a/tb_rest_client/models/models_pe/page_data_widgets_bundle.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class PageDataWidgetsBundle(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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[WidgetsBundle]', - 'has_next': 'bool', - 'total_elements': 'int', - 'total_pages': 'int' - } - - attribute_map = { - 'data': 'data', - 'has_next': 'hasNext', - 'total_elements': 'totalElements', - 'total_pages': 'totalPages' - } - - def __init__(self, data=None, has_next=None, total_elements=None, total_pages=None): # noqa: E501 - """PageDataWidgetsBundle - a model defined in Swagger""" # noqa: E501 - - self._data = None - self._has_next = None - self._total_elements = None - self._total_pages = None - self.discriminator = None - - if data is not None: - self.data = data - if has_next is not None: - self.has_next = has_next - if total_elements is not None: - self.total_elements = total_elements - if total_pages is not None: - self.total_pages = total_pages - - @property - def data(self): - """Gets the data of this PageDataWidgetsBundle. # noqa: E501 - - - :return: The data of this PageDataWidgetsBundle. # noqa: E501 - :rtype: list[WidgetsBundle] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataWidgetsBundle. - - - :param data: The data of this PageDataWidgetsBundle. # noqa: E501 - :type: list[WidgetsBundle] - """ - - self._data = data - - @property - def has_next(self): - """Gets the has_next of this PageDataWidgetsBundle. # noqa: E501 - - - :return: The has_next of this PageDataWidgetsBundle. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataWidgetsBundle. - - - :param has_next: The has_next of this PageDataWidgetsBundle. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - @property - def total_elements(self): - """Gets the total_elements of this PageDataWidgetsBundle. # noqa: E501 - - - :return: The total_elements of this PageDataWidgetsBundle. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataWidgetsBundle. - - - :param total_elements: The total_elements of this PageDataWidgetsBundle. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def total_pages(self): - """Gets the total_pages of this PageDataWidgetsBundle. # noqa: E501 - - - :return: The total_pages of this PageDataWidgetsBundle. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataWidgetsBundle. - - - :param total_pages: The total_pages of this PageDataWidgetsBundle. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - 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(PageDataWidgetsBundle, 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, PageDataWidgetsBundle): - 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/resource.py b/tb_rest_client/models/models_pe/resource.py deleted file mode 100644 index 305c5eee..00000000 --- a/tb_rest_client/models/models_pe/resource.py +++ /dev/null @@ -1,298 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class Resource(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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', - 'file': 'file', - 'filename': 'str', - 'input_stream': 'InputStream', - 'open': 'bool', - 'readable': 'bool', - 'uri': 'URI', - 'url': 'URL' - } - - attribute_map = { - 'description': 'description', - 'file': 'file', - 'filename': 'filename', - 'input_stream': 'inputStream', - 'open': 'open', - 'readable': 'readable', - 'uri': 'uri', - 'url': 'url' - } - - def __init__(self, description=None, file=None, filename=None, input_stream=None, open=None, readable=None, uri=None, url=None): # noqa: E501 - """Resource - a model defined in Swagger""" # noqa: E501 - - self._description = None - self._file = None - self._filename = None - self._input_stream = None - self._open = None - self._readable = None - self._uri = None - self._url = None - self.discriminator = None - - if description is not None: - self.description = description - if file is not None: - self.file = file - if filename is not None: - self.filename = filename - if input_stream is not None: - self.input_stream = input_stream - if open is not None: - self.open = open - if readable is not None: - self.readable = readable - if uri is not None: - self.uri = uri - if url is not None: - self.url = url - - @property - def description(self): - """Gets the description of this Resource. # noqa: E501 - - - :return: The description of this Resource. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Resource. - - - :param description: The description of this Resource. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def file(self): - """Gets the file of this Resource. # noqa: E501 - - - :return: The file of this Resource. # noqa: E501 - :rtype: file - """ - return self._file - - @file.setter - def file(self, file): - """Sets the file of this Resource. - - - :param file: The file of this Resource. # noqa: E501 - :type: file - """ - - self._file = file - - @property - def filename(self): - """Gets the filename of this Resource. # noqa: E501 - - - :return: The filename of this Resource. # noqa: E501 - :rtype: str - """ - return self._filename - - @filename.setter - def filename(self, filename): - """Sets the filename of this Resource. - - - :param filename: The filename of this Resource. # noqa: E501 - :type: str - """ - - self._filename = filename - - @property - def input_stream(self): - """Gets the input_stream of this Resource. # noqa: E501 - - - :return: The input_stream of this Resource. # noqa: E501 - :rtype: InputStream - """ - return self._input_stream - - @input_stream.setter - def input_stream(self, input_stream): - """Sets the input_stream of this Resource. - - - :param input_stream: The input_stream of this Resource. # noqa: E501 - :type: InputStream - """ - - self._input_stream = input_stream - - @property - def open(self): - """Gets the open of this Resource. # noqa: E501 - - - :return: The open of this Resource. # noqa: E501 - :rtype: bool - """ - return self._open - - @open.setter - def open(self, open): - """Sets the open of this Resource. - - - :param open: The open of this Resource. # noqa: E501 - :type: bool - """ - - self._open = open - - @property - def readable(self): - """Gets the readable of this Resource. # noqa: E501 - - - :return: The readable of this Resource. # noqa: E501 - :rtype: bool - """ - return self._readable - - @readable.setter - def readable(self, readable): - """Sets the readable of this Resource. - - - :param readable: The readable of this Resource. # noqa: E501 - :type: bool - """ - - self._readable = readable - - @property - def uri(self): - """Gets the uri of this Resource. # noqa: E501 - - - :return: The uri of this Resource. # noqa: E501 - :rtype: URI - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this Resource. - - - :param uri: The uri of this Resource. # noqa: E501 - :type: URI - """ - - self._uri = uri - - @property - def url(self): - """Gets the url of this Resource. # noqa: E501 - - - :return: The url of this Resource. # noqa: E501 - :rtype: URL - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this Resource. - - - :param url: The url of this Resource. # noqa: E501 - :type: URL - """ - - self._url = url - - 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(Resource, 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, Resource): - 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 d4129e87..1d31f19c 100644 --- a/tb_rest_client/models/models_pe/scheduler_event_id.py +++ b/tb_rest_client/models/models_pe/scheduler_event_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class SchedulerEventId(object): + +class SchedulerEventId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,20 +29,10 @@ class SchedulerEventId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """SchedulerEventId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - if id is not None: - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/models/models_pe/tenant_profile.py b/tb_rest_client/models/models_pe/tenant_profile.py deleted file mode 100644 index 290e7ece..00000000 --- a/tb_rest_client/models/models_pe/tenant_profile.py +++ /dev/null @@ -1,303 +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 TenantProfile(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_time': 'int', - 'default': 'bool', - 'description': 'str', - 'id': 'TenantProfileId', - 'isolated_tb_core': 'bool', - 'isolated_tb_rule_engine': 'bool', - 'name': 'str', - 'profile_data': 'TenantProfileData' - } - - attribute_map = { - 'created_time': 'createdTime', - 'default': 'default', - 'description': 'description', - 'id': 'id', - 'isolated_tb_core': 'isolatedTbCore', - 'isolated_tb_rule_engine': 'isolatedTbRuleEngine', - 'name': 'name', - 'profile_data': 'profileData' - } - - def __init__(self, created_time=None, default=None, description=None, id=None, isolated_tb_core=None, isolated_tb_rule_engine=None, name=None, profile_data=None, _configuration=None): # noqa: E501 - """TenantProfile - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._created_time = None - self._default = None - self._description = None - self._id = None - self._isolated_tb_core = None - self._isolated_tb_rule_engine = None - self._name = None - self._profile_data = None - self.discriminator = None - - if created_time is not None: - self.created_time = created_time - if default is not None: - self.default = default - if description is not None: - self.description = description - if id is not None: - self.id = id - 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 name is not None: - self.name = name - if profile_data is not None: - self.profile_data = profile_data - - @property - def created_time(self): - """Gets the created_time of this TenantProfile. # noqa: E501 - - - :return: The created_time of this TenantProfile. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this TenantProfile. - - - :param created_time: The created_time of this TenantProfile. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def default(self): - """Gets the default of this TenantProfile. # noqa: E501 - - - :return: The default of this TenantProfile. # noqa: E501 - :rtype: bool - """ - return self._default - - @default.setter - def default(self, default): - """Sets the default of this TenantProfile. - - - :param default: The default of this TenantProfile. # noqa: E501 - :type: bool - """ - - self._default = default - - @property - def description(self): - """Gets the description of this TenantProfile. # noqa: E501 - - - :return: The description of this TenantProfile. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TenantProfile. - - - :param description: The description of this TenantProfile. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def id(self): - """Gets the id of this TenantProfile. # noqa: E501 - - - :return: The id of this TenantProfile. # noqa: E501 - :rtype: TenantProfileId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TenantProfile. - - - :param id: The id of this TenantProfile. # noqa: E501 - :type: TenantProfileId - """ - - self._id = id - - @property - def isolated_tb_core(self): - """Gets the isolated_tb_core of this TenantProfile. # 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. - - - :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 - - - :return: The isolated_tb_rule_engine of this TenantProfile. # noqa: E501 - :rtype: bool - """ - return self._isolated_tb_rule_engine - - @isolated_tb_rule_engine.setter - def isolated_tb_rule_engine(self, isolated_tb_rule_engine): - """Sets the isolated_tb_rule_engine of this TenantProfile. - - - :param isolated_tb_rule_engine: The isolated_tb_rule_engine of this TenantProfile. # noqa: E501 - :type: bool - """ - - self._isolated_tb_rule_engine = isolated_tb_rule_engine - - @property - def name(self): - """Gets the name of this TenantProfile. # noqa: E501 - - - :return: The name of this TenantProfile. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TenantProfile. - - - :param name: The name of this TenantProfile. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def profile_data(self): - """Gets the profile_data of this TenantProfile. # noqa: E501 - - - :return: The profile_data of this TenantProfile. # noqa: E501 - :rtype: TenantProfileData - """ - return self._profile_data - - @profile_data.setter - def profile_data(self, profile_data): - """Sets the profile_data of this TenantProfile. - - - :param profile_data: The profile_data of this TenantProfile. # noqa: E501 - :type: TenantProfileData - """ - - self._profile_data = profile_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(TenantProfile, 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, TenantProfile): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TenantProfile): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file diff --git a/tb_rest_client/models/models_pe/tenant_profile_configuration.py b/tb_rest_client/models/models_pe/tenant_profile_configuration.py deleted file mode 100644 index 9f6d6065..00000000 --- a/tb_rest_client/models/models_pe/tenant_profile_configuration.py +++ /dev/null @@ -1,93 +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 TenantProfileConfiguration(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, _configuration=None): # noqa: E501 - """TenantProfileConfiguration - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - 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(TenantProfileConfiguration, 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, TenantProfileConfiguration): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TenantProfileConfiguration): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file diff --git a/tb_rest_client/models/models_pe/tenant_profile_data.py b/tb_rest_client/models/models_pe/tenant_profile_data.py deleted file mode 100644 index d9ba033e..00000000 --- a/tb_rest_client/models/models_pe/tenant_profile_data.py +++ /dev/null @@ -1,121 +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 TenantProfileData(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': 'TenantProfileConfiguration' - } - - attribute_map = { - 'configuration': 'configuration' - } - - def __init__(self, configuration=None, _configuration=None): # noqa: E501 - """TenantProfileData - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._configuration = None - self.discriminator = None - - if configuration is not None: - self.configuration = configuration - - @property - def configuration(self): - """Gets the configuration of this TenantProfileData. # noqa: E501 - - - :return: The configuration of this TenantProfileData. # noqa: E501 - :rtype: TenantProfileConfiguration - """ - return self._configuration - - @configuration.setter - def configuration(self, configuration): - """Sets the configuration of this TenantProfileData. - - - :param configuration: The configuration of this TenantProfileData. # noqa: E501 - :type: TenantProfileConfiguration - """ - - self._configuration = configuration - - 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(TenantProfileData, 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, TenantProfileData): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TenantProfileData): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file diff --git a/tb_rest_client/models/models_pe/tenant_profile_id.py b/tb_rest_client/models/models_pe/tenant_profile_id.py deleted file mode 100644 index 148c86a1..00000000 --- a/tb_rest_client/models/models_pe/tenant_profile_id.py +++ /dev/null @@ -1,121 +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 TenantProfileId(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, _configuration=None): # noqa: E501 - """TenantProfileId - a model defined in Swagger""" # noqa: E501 - if _configuration is None: - _configuration = Configuration() - self._configuration = _configuration - - self._id = None - self.discriminator = None - - if id is not None: - self.id = id - - @property - def id(self): - """Gets the id of this TenantProfileId. # noqa: E501 - - - :return: The id of this TenantProfileId. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TenantProfileId. - - - :param id: The id of this TenantProfileId. # noqa: E501 - :type: str - """ - - 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(TenantProfileId, 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, TenantProfileId): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, TenantProfileId): - return True - - return self.to_dict() != other.to_dict() \ No newline at end of file diff --git a/tb_rest_client/models/models_pe/uri.py b/tb_rest_client/models/models_pe/uri.py deleted file mode 100644 index 51d5626c..00000000 --- a/tb_rest_client/models/models_pe/uri.py +++ /dev/null @@ -1,532 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class URI(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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_pe/url.py b/tb_rest_client/models/models_pe/url.py deleted file mode 100644 index 791b12b2..00000000 --- a/tb_rest_client/models/models_pe/url.py +++ /dev/null @@ -1,376 +0,0 @@ -# coding: utf-8 -# Copyright 2020. ThingsBoard -# # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# # -# http://www.apache.org/licenses/LICENSE-2.0 -# # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import pprint -import re # noqa: F401 - -import six - - -class URL(object): - """NOTE: This class is auto generated by the swagger code generator program. - """ - - """ - 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_pe/user_id.py b/tb_rest_client/models/models_pe/user_id.py index 6101e7f1..1d883779 100644 --- a/tb_rest_client/models/models_pe/user_id.py +++ b/tb_rest_client/models/models_pe/user_id.py @@ -14,8 +14,10 @@ import re # noqa: F401 import six +from . import EntityId -class UserId(object): + +class UserId(EntityId): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -27,19 +29,10 @@ class UserId(object): 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 + def __init__(self, entity_type, id=None): # noqa: E501 """UserId - a model defined in Swagger""" # noqa: E501 - self._id = None - self.discriminator = None - self.id = id + super().__init__(entity_type, id) @property def id(self): diff --git a/tb_rest_client/rest_client_pe.py b/tb_rest_client/rest_client_pe.py index f8619ec8..523cc0ae 100644 --- a/tb_rest_client/rest_client_pe.py +++ b/tb_rest_client/rest_client_pe.py @@ -733,27 +733,27 @@ def get_dashboards_by_entity_group_id(self, entity_group_id: EntityGroupId, page def get_tenant_home_dashboard_info(self, ): return self.dashboard_controller.get_tenant_home_dashboard_info_using_get() - def _check_integration_connection_post(self, body: Integration): + def check_integration_connection_post(self, body: Integration): return self.integration_controller.check_integration_connection_using_post(body=body) - def _delete_integration_delete(self, integration_id: IntegrationId): + def delete_integration_delete(self, integration_id: IntegrationId): integration_id = self.get_id(integration_id) return self.integration_controller.delete_integration_using_delete(integration_id=integration_id) - def _get_integration_by_id_get(self, integration_id: IntegrationId): + def get_integration_by_id_get(self, integration_id: IntegrationId): integration_id = self.get_id(integration_id) return self.integration_controller.get_integration_by_id_using_get(integration_id=integration_id) - def _get_integration_by_routing_key_get(self, routing_key: str): + def get_integration_by_routing_key_get(self, routing_key: str): return self.integration_controller.get_integration_by_routing_key_using_get(routing_key=routing_key) - def _get_integrations_by_ids_get(self, integration_ids: list): + def get_integrations_by_ids_get(self, integration_ids: list): return self.integration_controller.get_integrations_by_ids_using_get(integration_ids=integration_ids) - def _get_integrations_get(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): + def get_integrations_get(self, page_size: str, page: str, text_search=None, sort_property=None, sort_order=None): return self.integration_controller.get_integrations_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def _save_integration_post(self, body: Integration): + def save_integration_post(self, body: Integration): return self.integration_controller.save_integration_using_post(body=body) def get_current_custom_menu(self, ):