From cc6eb995472c69bb005c17453764f60e479e2c59 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 1 Jul 2019 15:47:03 -0700 Subject: [PATCH 1/8] [AutoPR iothub/resource-manager] [Hub Generated] Review request for Microsoft.Devices to add version preview/2019-03-22-preview (#6123) * Generated from a2660396e04a6551432a9f9e108956db05266023 adding locations property to iothub properties * Generated from b11a3ac1fafc172c5933d5e07a47a7ea1d4a1c0f adding locations property * Packaging update of azure-mgmt-iothub --- sdk/iothub/azure-mgmt-iothub/README.rst | 2 +- .../azure/mgmt/iothub/__init__.py | 7 +- .../azure/mgmt/iothub/_configuration.py | 48 + .../{iot_hub_client.py => _iot_hub_client.py} | 46 +- .../azure/mgmt/iothub/models/__init__.py | 343 +-- ...ient_enums.py => _iot_hub_client_enums.py} | 6 + .../azure/mgmt/iothub/models/_models.py | 2107 +++++++++++++++++ .../azure/mgmt/iothub/models/_models_py3.py | 2107 +++++++++++++++++ .../azure/mgmt/iothub/models/_paged_models.py | 118 + .../models/certificate_body_description.py | 29 - .../certificate_body_description_py3.py | 29 - .../iothub/models/certificate_description.py | 54 - .../models/certificate_description_py3.py | 54 - .../models/certificate_list_description.py | 28 - .../certificate_list_description_py3.py | 28 - .../iothub/models/certificate_properties.py | 64 - .../models/certificate_properties_py3.py | 64 - .../certificate_properties_with_nonce.py | 72 - .../certificate_properties_with_nonce_py3.py | 72 - .../certificate_verification_description.py | 29 - ...ertificate_verification_description_py3.py | 29 - .../certificate_with_nonce_description.py | 54 - .../certificate_with_nonce_description_py3.py | 54 - .../models/cloud_to_device_properties.py | 44 - .../models/cloud_to_device_properties_py3.py | 44 - .../iothub/models/endpoint_health_data.py | 43 - .../models/endpoint_health_data_paged.py | 27 - .../iothub/models/endpoint_health_data_py3.py | 43 - .../iothub/models/enrichment_properties.py | 46 - .../models/enrichment_properties_py3.py | 46 - .../azure/mgmt/iothub/models/error_details.py | 63 - .../mgmt/iothub/models/error_details_py3.py | 63 - .../models/event_hub_consumer_group_info.py | 54 - .../event_hub_consumer_group_info_paged.py | 27 - .../event_hub_consumer_group_info_py3.py | 54 - .../iothub/models/event_hub_properties.py | 59 - .../iothub/models/event_hub_properties_py3.py | 59 - .../iothub/models/export_devices_request.py | 41 - .../models/export_devices_request_py3.py | 41 - .../mgmt/iothub/models/failover_input.py | 34 - .../mgmt/iothub/models/failover_input_py3.py | 34 - .../models/fallback_route_properties.py | 66 - .../models/fallback_route_properties_py3.py | 66 - .../mgmt/iothub/models/feedback_properties.py | 46 - .../iothub/models/feedback_properties_py3.py | 46 - .../iothub/models/import_devices_request.py | 40 - .../models/import_devices_request_py3.py | 40 - .../mgmt/iothub/models/iot_hub_capacity.py | 51 - .../iothub/models/iot_hub_capacity_py3.py | 51 - .../mgmt/iothub/models/iot_hub_description.py | 66 - .../models/iot_hub_description_paged.py | 27 - .../iothub/models/iot_hub_description_py3.py | 66 - .../models/iot_hub_name_availability_info.py | 47 - .../iot_hub_name_availability_info_py3.py | 47 - .../mgmt/iothub/models/iot_hub_properties.py | 106 - .../iot_hub_properties_device_streams.py | 28 - .../iot_hub_properties_device_streams_py3.py | 28 - .../iothub/models/iot_hub_properties_py3.py | 106 - .../models/iot_hub_quota_metric_info.py | 45 - .../models/iot_hub_quota_metric_info_paged.py | 27 - .../models/iot_hub_quota_metric_info_py3.py | 45 - .../iothub/models/iot_hub_sku_description.py | 47 - .../models/iot_hub_sku_description_paged.py | 27 - .../models/iot_hub_sku_description_py3.py | 47 - .../mgmt/iothub/models/iot_hub_sku_info.py | 49 - .../iothub/models/iot_hub_sku_info_py3.py | 49 - .../mgmt/iothub/models/ip_filter_rule.py | 46 - .../mgmt/iothub/models/ip_filter_rule_py3.py | 46 - .../azure/mgmt/iothub/models/job_response.py | 75 - .../mgmt/iothub/models/job_response_paged.py | 27 - .../mgmt/iothub/models/job_response_py3.py | 75 - .../azure/mgmt/iothub/models/matched_route.py | 28 - .../mgmt/iothub/models/matched_route_py3.py | 28 - .../models/messaging_endpoint_properties.py | 45 - .../messaging_endpoint_properties_py3.py | 45 - .../azure/mgmt/iothub/models/name.py | 32 - .../azure/mgmt/iothub/models/name_py3.py | 32 - .../azure/mgmt/iothub/models/operation.py | 40 - .../mgmt/iothub/models/operation_display.py | 50 - .../iothub/models/operation_display_py3.py | 50 - .../mgmt/iothub/models/operation_inputs.py | 34 - .../iothub/models/operation_inputs_py3.py | 34 - .../mgmt/iothub/models/operation_paged.py | 27 - .../azure/mgmt/iothub/models/operation_py3.py | 40 - .../mgmt/iothub/models/registry_statistics.py | 48 - .../iothub/models/registry_statistics_py3.py | 48 - .../azure/mgmt/iothub/models/resource.py | 56 - .../azure/mgmt/iothub/models/resource_py3.py | 56 - .../iothub/models/route_compilation_error.py | 37 - .../models/route_compilation_error_py3.py | 37 - .../iothub/models/route_error_position.py | 32 - .../iothub/models/route_error_position_py3.py | 32 - .../mgmt/iothub/models/route_error_range.py | 32 - .../iothub/models/route_error_range_py3.py | 32 - .../mgmt/iothub/models/route_properties.py | 64 - .../iothub/models/route_properties_py3.py | 64 - .../mgmt/iothub/models/routing_endpoints.py | 52 - .../iothub/models/routing_endpoints_py3.py | 52 - .../models/routing_event_hub_properties.py | 54 - .../routing_event_hub_properties_py3.py | 54 - .../mgmt/iothub/models/routing_message.py | 36 - .../mgmt/iothub/models/routing_message_py3.py | 36 - .../mgmt/iothub/models/routing_properties.py | 50 - .../iothub/models/routing_properties_py3.py | 50 - ...g_service_bus_queue_endpoint_properties.py | 55 - ...rvice_bus_queue_endpoint_properties_py3.py | 55 - ...g_service_bus_topic_endpoint_properties.py | 55 - ...rvice_bus_topic_endpoint_properties_py3.py | 55 - .../routing_storage_container_properties.py | 86 - ...outing_storage_container_properties_py3.py | 86 - .../azure/mgmt/iothub/models/routing_twin.py | 32 - .../iothub/models/routing_twin_properties.py | 32 - .../models/routing_twin_properties_py3.py | 32 - .../mgmt/iothub/models/routing_twin_py3.py | 32 - ...red_access_signature_authorization_rule.py | 56 - ...cess_signature_authorization_rule_paged.py | 27 - ...access_signature_authorization_rule_py3.py | 56 - .../models/storage_endpoint_properties.py | 48 - .../models/storage_endpoint_properties_py3.py | 48 - .../azure/mgmt/iothub/models/tags_resource.py | 29 - .../mgmt/iothub/models/tags_resource_py3.py | 29 - .../iothub/models/test_all_routes_input.py | 38 - .../models/test_all_routes_input_py3.py | 38 - .../iothub/models/test_all_routes_result.py | 28 - .../models/test_all_routes_result_py3.py | 28 - .../mgmt/iothub/models/test_route_input.py | 42 - .../iothub/models/test_route_input_py3.py | 42 - .../mgmt/iothub/models/test_route_result.py | 33 - .../models/test_route_result_details.py | 30 - .../models/test_route_result_details_py3.py | 30 - .../iothub/models/test_route_result_py3.py | 33 - .../iothub/models/user_subscription_quota.py | 48 - .../user_subscription_quota_list_result.py | 39 - ...user_subscription_quota_list_result_py3.py | 39 - .../models/user_subscription_quota_py3.py | 48 - .../azure/mgmt/iothub/operations/__init__.py | 10 +- ...rations.py => _certificates_operations.py} | 7 +- ...b_operations.py => _iot_hub_operations.py} | 2 + ...ons.py => _iot_hub_resource_operations.py} | 125 +- .../{operations.py => _operations.py} | 16 +- ...> _resource_provider_common_operations.py} | 3 +- sdk/iothub/azure-mgmt-iothub/setup.py | 1 - 142 files changed, 4659 insertions(+), 6039 deletions(-) create mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py rename sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/{iot_hub_client.py => _iot_hub_client.py} (64%) rename sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/{iot_hub_client_enums.py => _iot_hub_client_enums.py} (97%) create mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py create mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py create mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_paged_models.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_paged.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_paged.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_paged.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_paged.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_paged.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_paged.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_paged.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_paged.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_py3.py rename sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/{certificates_operations.py => _certificates_operations.py} (99%) rename sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/{iot_hub_operations.py => _iot_hub_operations.py} (97%) rename sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/{iot_hub_resource_operations.py => _iot_hub_resource_operations.py} (97%) rename sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/{operations.py => _operations.py} (90%) rename sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/{resource_provider_common_operations.py => _resource_provider_common_operations.py} (96%) diff --git a/sdk/iothub/azure-mgmt-iothub/README.rst b/sdk/iothub/azure-mgmt-iothub/README.rst index 7f83a5d29d04..81686275544a 100644 --- a/sdk/iothub/azure-mgmt-iothub/README.rst +++ b/sdk/iothub/azure-mgmt-iothub/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure IoTHub Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py index 91289650718f..867dea34192d 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .iot_hub_client import IotHubClient -from .version import VERSION +from ._configuration import IotHubClientConfiguration +from ._iot_hub_client import IotHubClient +__all__ = ['IotHubClient', 'IotHubClientConfiguration'] -__all__ = ['IotHubClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py new file mode 100644 index 000000000000..b2e8885bcfe2 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_configuration.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- +from msrestazure import AzureConfiguration + +from .version import VERSION + + +class IotHubClientConfiguration(AzureConfiguration): + """Configuration for IotHubClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(IotHubClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-iothub/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/iot_hub_client.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py similarity index 64% rename from sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/iot_hub_client.py rename to sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py index 1c78a95c60c8..fbe07e66cddc 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/iot_hub_client.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py @@ -11,46 +11,14 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.iot_hub_resource_operations import IotHubResourceOperations -from .operations.resource_provider_common_operations import ResourceProviderCommonOperations -from .operations.certificates_operations import CertificatesOperations -from .operations.iot_hub_operations import IotHubOperations -from . import models - - -class IotHubClientConfiguration(AzureConfiguration): - """Configuration for IotHubClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription identifier. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(IotHubClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-iothub/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import IotHubClientConfiguration +from .operations import Operations +from .operations import IotHubResourceOperations +from .operations import ResourceProviderCommonOperations +from .operations import CertificatesOperations +from .operations import IotHubOperations +from . import models class IotHubClient(SDKClient): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py index c5b6000fbe1c..855c564865d3 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py @@ -10,138 +10,141 @@ # -------------------------------------------------------------------------- try: - from .certificate_verification_description_py3 import CertificateVerificationDescription - from .certificate_properties_py3 import CertificateProperties - from .certificate_description_py3 import CertificateDescription - from .certificate_list_description_py3 import CertificateListDescription - from .certificate_body_description_py3 import CertificateBodyDescription - from .certificate_properties_with_nonce_py3 import CertificatePropertiesWithNonce - from .certificate_with_nonce_description_py3 import CertificateWithNonceDescription - from .shared_access_signature_authorization_rule_py3 import SharedAccessSignatureAuthorizationRule - from .ip_filter_rule_py3 import IpFilterRule - from .event_hub_properties_py3 import EventHubProperties - from .routing_service_bus_queue_endpoint_properties_py3 import RoutingServiceBusQueueEndpointProperties - from .routing_service_bus_topic_endpoint_properties_py3 import RoutingServiceBusTopicEndpointProperties - from .routing_event_hub_properties_py3 import RoutingEventHubProperties - from .routing_storage_container_properties_py3 import RoutingStorageContainerProperties - from .routing_endpoints_py3 import RoutingEndpoints - from .route_properties_py3 import RouteProperties - from .fallback_route_properties_py3 import FallbackRouteProperties - from .enrichment_properties_py3 import EnrichmentProperties - from .routing_properties_py3 import RoutingProperties - from .storage_endpoint_properties_py3 import StorageEndpointProperties - from .messaging_endpoint_properties_py3 import MessagingEndpointProperties - from .feedback_properties_py3 import FeedbackProperties - from .cloud_to_device_properties_py3 import CloudToDeviceProperties - from .iot_hub_properties_device_streams_py3 import IotHubPropertiesDeviceStreams - from .iot_hub_properties_py3 import IotHubProperties - from .iot_hub_sku_info_py3 import IotHubSkuInfo - from .iot_hub_description_py3 import IotHubDescription - from .resource_py3 import Resource - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .error_details_py3 import ErrorDetails, ErrorDetailsException - from .iot_hub_quota_metric_info_py3 import IotHubQuotaMetricInfo - from .endpoint_health_data_py3 import EndpointHealthData - from .registry_statistics_py3 import RegistryStatistics - from .job_response_py3 import JobResponse - from .iot_hub_capacity_py3 import IotHubCapacity - from .iot_hub_sku_description_py3 import IotHubSkuDescription - from .tags_resource_py3 import TagsResource - from .event_hub_consumer_group_info_py3 import EventHubConsumerGroupInfo - from .operation_inputs_py3 import OperationInputs - from .iot_hub_name_availability_info_py3 import IotHubNameAvailabilityInfo - from .name_py3 import Name - from .user_subscription_quota_py3 import UserSubscriptionQuota - from .user_subscription_quota_list_result_py3 import UserSubscriptionQuotaListResult - from .routing_message_py3 import RoutingMessage - from .routing_twin_properties_py3 import RoutingTwinProperties - from .routing_twin_py3 import RoutingTwin - from .test_all_routes_input_py3 import TestAllRoutesInput - from .matched_route_py3 import MatchedRoute - from .test_all_routes_result_py3 import TestAllRoutesResult - from .test_route_input_py3 import TestRouteInput - from .route_error_position_py3 import RouteErrorPosition - from .route_error_range_py3 import RouteErrorRange - from .route_compilation_error_py3 import RouteCompilationError - from .test_route_result_details_py3 import TestRouteResultDetails - from .test_route_result_py3 import TestRouteResult - from .export_devices_request_py3 import ExportDevicesRequest - from .import_devices_request_py3 import ImportDevicesRequest - from .failover_input_py3 import FailoverInput + from ._models_py3 import CertificateBodyDescription + from ._models_py3 import CertificateDescription + from ._models_py3 import CertificateListDescription + from ._models_py3 import CertificateProperties + from ._models_py3 import CertificatePropertiesWithNonce + from ._models_py3 import CertificateVerificationDescription + from ._models_py3 import CertificateWithNonceDescription + from ._models_py3 import CloudToDeviceProperties + from ._models_py3 import EndpointHealthData + from ._models_py3 import EnrichmentProperties + from ._models_py3 import ErrorDetails, ErrorDetailsException + from ._models_py3 import EventHubConsumerGroupInfo + from ._models_py3 import EventHubProperties + from ._models_py3 import ExportDevicesRequest + from ._models_py3 import FailoverInput + from ._models_py3 import FallbackRouteProperties + from ._models_py3 import FeedbackProperties + from ._models_py3 import ImportDevicesRequest + from ._models_py3 import IotHubCapacity + from ._models_py3 import IotHubDescription + from ._models_py3 import IotHubLocationDescription + from ._models_py3 import IotHubNameAvailabilityInfo + from ._models_py3 import IotHubProperties + from ._models_py3 import IotHubPropertiesDeviceStreams + from ._models_py3 import IotHubQuotaMetricInfo + from ._models_py3 import IotHubSkuDescription + from ._models_py3 import IotHubSkuInfo + from ._models_py3 import IpFilterRule + from ._models_py3 import JobResponse + from ._models_py3 import MatchedRoute + from ._models_py3 import MessagingEndpointProperties + from ._models_py3 import Name + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationInputs + from ._models_py3 import RegistryStatistics + from ._models_py3 import Resource + from ._models_py3 import RouteCompilationError + from ._models_py3 import RouteErrorPosition + from ._models_py3 import RouteErrorRange + from ._models_py3 import RouteProperties + from ._models_py3 import RoutingEndpoints + from ._models_py3 import RoutingEventHubProperties + from ._models_py3 import RoutingMessage + from ._models_py3 import RoutingProperties + from ._models_py3 import RoutingServiceBusQueueEndpointProperties + from ._models_py3 import RoutingServiceBusTopicEndpointProperties + from ._models_py3 import RoutingStorageContainerProperties + from ._models_py3 import RoutingTwin + from ._models_py3 import RoutingTwinProperties + from ._models_py3 import SharedAccessSignatureAuthorizationRule + from ._models_py3 import StorageEndpointProperties + from ._models_py3 import TagsResource + from ._models_py3 import TestAllRoutesInput + from ._models_py3 import TestAllRoutesResult + from ._models_py3 import TestRouteInput + from ._models_py3 import TestRouteResult + from ._models_py3 import TestRouteResultDetails + from ._models_py3 import UserSubscriptionQuota + from ._models_py3 import UserSubscriptionQuotaListResult except (SyntaxError, ImportError): - from .certificate_verification_description import CertificateVerificationDescription - from .certificate_properties import CertificateProperties - from .certificate_description import CertificateDescription - from .certificate_list_description import CertificateListDescription - from .certificate_body_description import CertificateBodyDescription - from .certificate_properties_with_nonce import CertificatePropertiesWithNonce - from .certificate_with_nonce_description import CertificateWithNonceDescription - from .shared_access_signature_authorization_rule import SharedAccessSignatureAuthorizationRule - from .ip_filter_rule import IpFilterRule - from .event_hub_properties import EventHubProperties - from .routing_service_bus_queue_endpoint_properties import RoutingServiceBusQueueEndpointProperties - from .routing_service_bus_topic_endpoint_properties import RoutingServiceBusTopicEndpointProperties - from .routing_event_hub_properties import RoutingEventHubProperties - from .routing_storage_container_properties import RoutingStorageContainerProperties - from .routing_endpoints import RoutingEndpoints - from .route_properties import RouteProperties - from .fallback_route_properties import FallbackRouteProperties - from .enrichment_properties import EnrichmentProperties - from .routing_properties import RoutingProperties - from .storage_endpoint_properties import StorageEndpointProperties - from .messaging_endpoint_properties import MessagingEndpointProperties - from .feedback_properties import FeedbackProperties - from .cloud_to_device_properties import CloudToDeviceProperties - from .iot_hub_properties_device_streams import IotHubPropertiesDeviceStreams - from .iot_hub_properties import IotHubProperties - from .iot_hub_sku_info import IotHubSkuInfo - from .iot_hub_description import IotHubDescription - from .resource import Resource - from .operation_display import OperationDisplay - from .operation import Operation - from .error_details import ErrorDetails, ErrorDetailsException - from .iot_hub_quota_metric_info import IotHubQuotaMetricInfo - from .endpoint_health_data import EndpointHealthData - from .registry_statistics import RegistryStatistics - from .job_response import JobResponse - from .iot_hub_capacity import IotHubCapacity - from .iot_hub_sku_description import IotHubSkuDescription - from .tags_resource import TagsResource - from .event_hub_consumer_group_info import EventHubConsumerGroupInfo - from .operation_inputs import OperationInputs - from .iot_hub_name_availability_info import IotHubNameAvailabilityInfo - from .name import Name - from .user_subscription_quota import UserSubscriptionQuota - from .user_subscription_quota_list_result import UserSubscriptionQuotaListResult - from .routing_message import RoutingMessage - from .routing_twin_properties import RoutingTwinProperties - from .routing_twin import RoutingTwin - from .test_all_routes_input import TestAllRoutesInput - from .matched_route import MatchedRoute - from .test_all_routes_result import TestAllRoutesResult - from .test_route_input import TestRouteInput - from .route_error_position import RouteErrorPosition - from .route_error_range import RouteErrorRange - from .route_compilation_error import RouteCompilationError - from .test_route_result_details import TestRouteResultDetails - from .test_route_result import TestRouteResult - from .export_devices_request import ExportDevicesRequest - from .import_devices_request import ImportDevicesRequest - from .failover_input import FailoverInput -from .operation_paged import OperationPaged -from .iot_hub_description_paged import IotHubDescriptionPaged -from .iot_hub_sku_description_paged import IotHubSkuDescriptionPaged -from .event_hub_consumer_group_info_paged import EventHubConsumerGroupInfoPaged -from .job_response_paged import JobResponsePaged -from .iot_hub_quota_metric_info_paged import IotHubQuotaMetricInfoPaged -from .endpoint_health_data_paged import EndpointHealthDataPaged -from .shared_access_signature_authorization_rule_paged import SharedAccessSignatureAuthorizationRulePaged -from .iot_hub_client_enums import ( + from ._models import CertificateBodyDescription + from ._models import CertificateDescription + from ._models import CertificateListDescription + from ._models import CertificateProperties + from ._models import CertificatePropertiesWithNonce + from ._models import CertificateVerificationDescription + from ._models import CertificateWithNonceDescription + from ._models import CloudToDeviceProperties + from ._models import EndpointHealthData + from ._models import EnrichmentProperties + from ._models import ErrorDetails, ErrorDetailsException + from ._models import EventHubConsumerGroupInfo + from ._models import EventHubProperties + from ._models import ExportDevicesRequest + from ._models import FailoverInput + from ._models import FallbackRouteProperties + from ._models import FeedbackProperties + from ._models import ImportDevicesRequest + from ._models import IotHubCapacity + from ._models import IotHubDescription + from ._models import IotHubLocationDescription + from ._models import IotHubNameAvailabilityInfo + from ._models import IotHubProperties + from ._models import IotHubPropertiesDeviceStreams + from ._models import IotHubQuotaMetricInfo + from ._models import IotHubSkuDescription + from ._models import IotHubSkuInfo + from ._models import IpFilterRule + from ._models import JobResponse + from ._models import MatchedRoute + from ._models import MessagingEndpointProperties + from ._models import Name + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationInputs + from ._models import RegistryStatistics + from ._models import Resource + from ._models import RouteCompilationError + from ._models import RouteErrorPosition + from ._models import RouteErrorRange + from ._models import RouteProperties + from ._models import RoutingEndpoints + from ._models import RoutingEventHubProperties + from ._models import RoutingMessage + from ._models import RoutingProperties + from ._models import RoutingServiceBusQueueEndpointProperties + from ._models import RoutingServiceBusTopicEndpointProperties + from ._models import RoutingStorageContainerProperties + from ._models import RoutingTwin + from ._models import RoutingTwinProperties + from ._models import SharedAccessSignatureAuthorizationRule + from ._models import StorageEndpointProperties + from ._models import TagsResource + from ._models import TestAllRoutesInput + from ._models import TestAllRoutesResult + from ._models import TestRouteInput + from ._models import TestRouteResult + from ._models import TestRouteResultDetails + from ._models import UserSubscriptionQuota + from ._models import UserSubscriptionQuotaListResult +from ._paged_models import EndpointHealthDataPaged +from ._paged_models import EventHubConsumerGroupInfoPaged +from ._paged_models import IotHubDescriptionPaged +from ._paged_models import IotHubQuotaMetricInfoPaged +from ._paged_models import IotHubSkuDescriptionPaged +from ._paged_models import JobResponsePaged +from ._paged_models import OperationPaged +from ._paged_models import SharedAccessSignatureAuthorizationRulePaged +from ._iot_hub_client_enums import ( AccessRights, IpFilterActionType, RoutingSource, Capabilities, + IotHubReplicaRoleType, IotHubSku, IotHubSkuTier, EndpointHealthStatus, @@ -154,65 +157,66 @@ ) __all__ = [ - 'CertificateVerificationDescription', - 'CertificateProperties', + 'CertificateBodyDescription', 'CertificateDescription', 'CertificateListDescription', - 'CertificateBodyDescription', + 'CertificateProperties', 'CertificatePropertiesWithNonce', + 'CertificateVerificationDescription', 'CertificateWithNonceDescription', - 'SharedAccessSignatureAuthorizationRule', - 'IpFilterRule', + 'CloudToDeviceProperties', + 'EndpointHealthData', + 'EnrichmentProperties', + 'ErrorDetails', 'ErrorDetailsException', + 'EventHubConsumerGroupInfo', 'EventHubProperties', - 'RoutingServiceBusQueueEndpointProperties', - 'RoutingServiceBusTopicEndpointProperties', - 'RoutingEventHubProperties', - 'RoutingStorageContainerProperties', - 'RoutingEndpoints', - 'RouteProperties', + 'ExportDevicesRequest', + 'FailoverInput', 'FallbackRouteProperties', - 'EnrichmentProperties', - 'RoutingProperties', - 'StorageEndpointProperties', - 'MessagingEndpointProperties', 'FeedbackProperties', - 'CloudToDeviceProperties', - 'IotHubPropertiesDeviceStreams', - 'IotHubProperties', - 'IotHubSkuInfo', + 'ImportDevicesRequest', + 'IotHubCapacity', 'IotHubDescription', - 'Resource', - 'OperationDisplay', - 'Operation', - 'ErrorDetails', 'ErrorDetailsException', + 'IotHubLocationDescription', + 'IotHubNameAvailabilityInfo', + 'IotHubProperties', + 'IotHubPropertiesDeviceStreams', 'IotHubQuotaMetricInfo', - 'EndpointHealthData', - 'RegistryStatistics', - 'JobResponse', - 'IotHubCapacity', 'IotHubSkuDescription', - 'TagsResource', - 'EventHubConsumerGroupInfo', - 'OperationInputs', - 'IotHubNameAvailabilityInfo', + 'IotHubSkuInfo', + 'IpFilterRule', + 'JobResponse', + 'MatchedRoute', + 'MessagingEndpointProperties', 'Name', - 'UserSubscriptionQuota', - 'UserSubscriptionQuotaListResult', + 'Operation', + 'OperationDisplay', + 'OperationInputs', + 'RegistryStatistics', + 'Resource', + 'RouteCompilationError', + 'RouteErrorPosition', + 'RouteErrorRange', + 'RouteProperties', + 'RoutingEndpoints', + 'RoutingEventHubProperties', 'RoutingMessage', - 'RoutingTwinProperties', + 'RoutingProperties', + 'RoutingServiceBusQueueEndpointProperties', + 'RoutingServiceBusTopicEndpointProperties', + 'RoutingStorageContainerProperties', 'RoutingTwin', + 'RoutingTwinProperties', + 'SharedAccessSignatureAuthorizationRule', + 'StorageEndpointProperties', + 'TagsResource', 'TestAllRoutesInput', - 'MatchedRoute', 'TestAllRoutesResult', 'TestRouteInput', - 'RouteErrorPosition', - 'RouteErrorRange', - 'RouteCompilationError', - 'TestRouteResultDetails', 'TestRouteResult', - 'ExportDevicesRequest', - 'ImportDevicesRequest', - 'FailoverInput', + 'TestRouteResultDetails', + 'UserSubscriptionQuota', + 'UserSubscriptionQuotaListResult', 'OperationPaged', 'IotHubDescriptionPaged', 'IotHubSkuDescriptionPaged', @@ -225,6 +229,7 @@ 'IpFilterActionType', 'RoutingSource', 'Capabilities', + 'IotHubReplicaRoleType', 'IotHubSku', 'IotHubSkuTier', 'EndpointHealthStatus', diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_client_enums.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py similarity index 97% rename from sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_client_enums.py rename to sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py index 61d358448458..e2619c34c7ed 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_client_enums.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py @@ -52,6 +52,12 @@ class Capabilities(str, Enum): device_management = "DeviceManagement" +class IotHubReplicaRoleType(str, Enum): + + primary = "primary" + secondary = "secondary" + + class IotHubSku(str, Enum): f1 = "F1" diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py new file mode 100644 index 000000000000..19da905a3803 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py @@ -0,0 +1,2107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CertificateBodyDescription(Model): + """The JSON-serialized X509 Certificate. + + :param certificate: base-64 representation of the X509 leaf certificate + .cer file or just .pem file content. + :type certificate: str + """ + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateBodyDescription, self).__init__(**kwargs) + self.certificate = kwargs.get('certificate', None) + + +class CertificateDescription(Model): + """The X509 Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: + :type properties: ~azure.mgmt.iothub.models.CertificateProperties + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The name of the certificate. + :vartype name: str + :ivar etag: The entity tag. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateDescription, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.id = None + self.name = None + self.etag = None + self.type = None + + +class CertificateListDescription(Model): + """The JSON-serialized array of Certificate objects. + + :param value: The array of Certificate objects. + :type value: list[~azure.mgmt.iothub.models.CertificateDescription] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateDescription]'}, + } + + def __init__(self, **kwargs): + super(CertificateListDescription, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class CertificateProperties(Model): + """The description of an X509 CA Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subject: The certificate's subject name. + :vartype subject: str + :ivar expiry: The certificate's expiration date and time. + :vartype expiry: datetime + :ivar thumbprint: The certificate's thumbprint. + :vartype thumbprint: str + :ivar is_verified: Determines whether certificate has been verified. + :vartype is_verified: bool + :ivar created: The certificate's create date and time. + :vartype created: datetime + :ivar updated: The certificate's last update date and time. + :vartype updated: datetime + :param certificate: The certificate content + :type certificate: str + """ + + _validation = { + 'subject': {'readonly': True}, + 'expiry': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'is_verified': {'readonly': True}, + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'subject': {'key': 'subject', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'is_verified': {'key': 'isVerified', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'rfc-1123'}, + 'updated': {'key': 'updated', 'type': 'rfc-1123'}, + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateProperties, self).__init__(**kwargs) + self.subject = None + self.expiry = None + self.thumbprint = None + self.is_verified = None + self.created = None + self.updated = None + self.certificate = kwargs.get('certificate', None) + + +class CertificatePropertiesWithNonce(Model): + """The description of an X509 CA Certificate including the challenge nonce + issued for the Proof-Of-Possession flow. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subject: The certificate's subject name. + :vartype subject: str + :ivar expiry: The certificate's expiration date and time. + :vartype expiry: datetime + :ivar thumbprint: The certificate's thumbprint. + :vartype thumbprint: str + :ivar is_verified: Determines whether certificate has been verified. + :vartype is_verified: bool + :ivar created: The certificate's create date and time. + :vartype created: datetime + :ivar updated: The certificate's last update date and time. + :vartype updated: datetime + :ivar verification_code: The certificate's verification code that will be + used for proof of possession. + :vartype verification_code: str + :ivar certificate: The certificate content + :vartype certificate: str + """ + + _validation = { + 'subject': {'readonly': True}, + 'expiry': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'is_verified': {'readonly': True}, + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + 'verification_code': {'readonly': True}, + 'certificate': {'readonly': True}, + } + + _attribute_map = { + 'subject': {'key': 'subject', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'is_verified': {'key': 'isVerified', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'rfc-1123'}, + 'updated': {'key': 'updated', 'type': 'rfc-1123'}, + 'verification_code': {'key': 'verificationCode', 'type': 'str'}, + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificatePropertiesWithNonce, self).__init__(**kwargs) + self.subject = None + self.expiry = None + self.thumbprint = None + self.is_verified = None + self.created = None + self.updated = None + self.verification_code = None + self.certificate = None + + +class CertificateVerificationDescription(Model): + """The JSON-serialized leaf certificate. + + :param certificate: base-64 representation of X509 certificate .cer file + or just .pem file content. + :type certificate: str + """ + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateVerificationDescription, self).__init__(**kwargs) + self.certificate = kwargs.get('certificate', None) + + +class CertificateWithNonceDescription(Model): + """The X509 Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: + :type properties: ~azure.mgmt.iothub.models.CertificatePropertiesWithNonce + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The name of the certificate. + :vartype name: str + :ivar etag: The entity tag. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'CertificatePropertiesWithNonce'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateWithNonceDescription, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.id = None + self.name = None + self.etag = None + self.type = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CloudToDeviceProperties(Model): + """The IoT hub cloud-to-device messaging properties. + + :param max_delivery_count: The max delivery count for cloud-to-device + messages in the device queue. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type max_delivery_count: int + :param default_ttl_as_iso8601: The default time to live for + cloud-to-device messages in the device queue. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type default_ttl_as_iso8601: timedelta + :param feedback: + :type feedback: ~azure.mgmt.iothub.models.FeedbackProperties + """ + + _validation = { + 'max_delivery_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, + 'default_ttl_as_iso8601': {'key': 'defaultTtlAsIso8601', 'type': 'duration'}, + 'feedback': {'key': 'feedback', 'type': 'FeedbackProperties'}, + } + + def __init__(self, **kwargs): + super(CloudToDeviceProperties, self).__init__(**kwargs) + self.max_delivery_count = kwargs.get('max_delivery_count', None) + self.default_ttl_as_iso8601 = kwargs.get('default_ttl_as_iso8601', None) + self.feedback = kwargs.get('feedback', None) + + +class EndpointHealthData(Model): + """The health data for an endpoint. + + :param endpoint_id: Id of the endpoint + :type endpoint_id: str + :param health_status: Health statuses have following meanings. The + 'healthy' status shows that the endpoint is accepting messages as + expected. The 'unhealthy' status shows that the endpoint is not accepting + messages as expected and IoT Hub is retrying to send data to this + endpoint. The status of an unhealthy endpoint will be updated to healthy + when IoT Hub has established an eventually consistent state of health. The + 'dead' status shows that the endpoint is not accepting messages, after IoT + Hub retried sending messages for the retrial period. See IoT Hub metrics + to identify errors and monitor issues with endpoints. The 'unknown' status + shows that the IoT Hub has not established a connection with the endpoint. + No messages have been delivered to or rejected from this endpoint. + Possible values include: 'unknown', 'healthy', 'unhealthy', 'dead' + :type health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus + """ + + _attribute_map = { + 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EndpointHealthData, self).__init__(**kwargs) + self.endpoint_id = kwargs.get('endpoint_id', None) + self.health_status = kwargs.get('health_status', None) + + +class EnrichmentProperties(Model): + """The properties of an enrichment that your IoT hub applies to messages + delivered to endpoints. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key or name for the enrichment property. + :type key: str + :param value: Required. The value for the enrichment property. + :type value: str + :param endpoint_names: Required. The list of endpoints for which the + enrichment is applied to the message. + :type endpoint_names: list[str] + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + 'endpoint_names': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(EnrichmentProperties, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) + self.endpoint_names = kwargs.get('endpoint_names', None) + + +class ErrorDetails(Model): + """Error details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar http_status_code: The HTTP status code. + :vartype http_status_code: str + :ivar message: The error message. + :vartype message: str + :ivar details: The error details. + :vartype details: str + """ + + _validation = { + 'code': {'readonly': True}, + 'http_status_code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'http_status_code': {'key': 'httpStatusCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.http_status_code = None + self.message = None + self.details = None + + +class ErrorDetailsException(HttpOperationError): + """Server responsed with exception of type: 'ErrorDetails'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) + + +class EventHubConsumerGroupInfo(Model): + """The properties of the EventHubConsumerGroupInfo object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: The tags. + :type properties: dict[str, str] + :ivar id: The Event Hub-compatible consumer group identifier. + :vartype id: str + :ivar name: The Event Hub-compatible consumer group name. + :vartype name: str + :ivar type: the resource type. + :vartype type: str + :ivar etag: The etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventHubConsumerGroupInfo, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class EventHubProperties(Model): + """The properties of the provisioned Event Hub-compatible endpoint used by the + IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param retention_time_in_days: The retention time for device-to-cloud + messages in days. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages + :type retention_time_in_days: long + :param partition_count: The number of partitions for receiving + device-to-cloud messages in the Event Hub-compatible endpoint. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. + :type partition_count: int + :ivar partition_ids: The partition ids in the Event Hub-compatible + endpoint. + :vartype partition_ids: list[str] + :ivar path: The Event Hub-compatible name. + :vartype path: str + :ivar endpoint: The Event Hub-compatible endpoint. + :vartype endpoint: str + """ + + _validation = { + 'partition_ids': {'readonly': True}, + 'path': {'readonly': True}, + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'retention_time_in_days': {'key': 'retentionTimeInDays', 'type': 'long'}, + 'partition_count': {'key': 'partitionCount', 'type': 'int'}, + 'partition_ids': {'key': 'partitionIds', 'type': '[str]'}, + 'path': {'key': 'path', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventHubProperties, self).__init__(**kwargs) + self.retention_time_in_days = kwargs.get('retention_time_in_days', None) + self.partition_count = kwargs.get('partition_count', None) + self.partition_ids = None + self.path = None + self.endpoint = None + + +class ExportDevicesRequest(Model): + """Use to provide parameters when requesting an export of all devices in the + IoT hub. + + All required parameters must be populated in order to send to Azure. + + :param export_blob_container_uri: Required. The export blob container URI. + :type export_blob_container_uri: str + :param exclude_keys: Required. The value indicating whether keys should be + excluded during export. + :type exclude_keys: bool + """ + + _validation = { + 'export_blob_container_uri': {'required': True}, + 'exclude_keys': {'required': True}, + } + + _attribute_map = { + 'export_blob_container_uri': {'key': 'exportBlobContainerUri', 'type': 'str'}, + 'exclude_keys': {'key': 'excludeKeys', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExportDevicesRequest, self).__init__(**kwargs) + self.export_blob_container_uri = kwargs.get('export_blob_container_uri', None) + self.exclude_keys = kwargs.get('exclude_keys', None) + + +class FailoverInput(Model): + """Use to provide failover region when requesting manual Failover for a hub. + + All required parameters must be populated in order to send to Azure. + + :param failover_region: Required. Region the hub will be failed over to + :type failover_region: str + """ + + _validation = { + 'failover_region': {'required': True}, + } + + _attribute_map = { + 'failover_region': {'key': 'failoverRegion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FailoverInput, self).__init__(**kwargs) + self.failover_region = kwargs.get('failover_region', None) + + +class FallbackRouteProperties(Model): + """The properties of the fallback route. IoT Hub uses these properties when it + routes messages to the fallback endpoint. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the route. The name can only include alphanumeric + characters, periods, underscores, hyphens, has a maximum length of 64 + characters, and must be unique. + :type name: str + :ivar source: Required. The source to which the routing rule is to be + applied to. For example, DeviceMessages. Default value: "DeviceMessages" . + :vartype source: str + :param condition: The condition which is evaluated in order to apply the + fallback route. If the condition is not provided it will evaluate to true + by default. For grammar, See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + :type condition: str + :param endpoint_names: Required. The list of endpoints to which the + messages that satisfy the condition are routed to. Currently only 1 + endpoint is allowed. + :type endpoint_names: list[str] + :param is_enabled: Required. Used to specify whether the fallback route is + enabled. + :type is_enabled: bool + """ + + _validation = { + 'source': {'required': True, 'constant': True}, + 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'condition': {'key': 'condition', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + source = "DeviceMessages" + + def __init__(self, **kwargs): + super(FallbackRouteProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.condition = kwargs.get('condition', None) + self.endpoint_names = kwargs.get('endpoint_names', None) + self.is_enabled = kwargs.get('is_enabled', None) + + +class FeedbackProperties(Model): + """The properties of the feedback queue for cloud-to-device messages. + + :param lock_duration_as_iso8601: The lock duration for the feedback queue. + See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type lock_duration_as_iso8601: timedelta + :param ttl_as_iso8601: The period of time for which a message is available + to consume before it is expired by the IoT hub. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type ttl_as_iso8601: timedelta + :param max_delivery_count: The number of times the IoT hub attempts to + deliver a message on the feedback queue. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type max_delivery_count: int + """ + + _validation = { + 'max_delivery_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, + 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, + 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FeedbackProperties, self).__init__(**kwargs) + self.lock_duration_as_iso8601 = kwargs.get('lock_duration_as_iso8601', None) + self.ttl_as_iso8601 = kwargs.get('ttl_as_iso8601', None) + self.max_delivery_count = kwargs.get('max_delivery_count', None) + + +class ImportDevicesRequest(Model): + """Use to provide parameters when requesting an import of all devices in the + hub. + + All required parameters must be populated in order to send to Azure. + + :param input_blob_container_uri: Required. The input blob container URI. + :type input_blob_container_uri: str + :param output_blob_container_uri: Required. The output blob container URI. + :type output_blob_container_uri: str + """ + + _validation = { + 'input_blob_container_uri': {'required': True}, + 'output_blob_container_uri': {'required': True}, + } + + _attribute_map = { + 'input_blob_container_uri': {'key': 'inputBlobContainerUri', 'type': 'str'}, + 'output_blob_container_uri': {'key': 'outputBlobContainerUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImportDevicesRequest, self).__init__(**kwargs) + self.input_blob_container_uri = kwargs.get('input_blob_container_uri', None) + self.output_blob_container_uri = kwargs.get('output_blob_container_uri', None) + + +class IotHubCapacity(Model): + """IoT Hub capacity information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum number of units. + :vartype minimum: long + :ivar maximum: The maximum number of units. + :vartype maximum: long + :ivar default: The default number of units. + :vartype default: long + :ivar scale_type: The type of the scaling enabled. Possible values + include: 'Automatic', 'Manual', 'None' + :vartype scale_type: str or ~azure.mgmt.iothub.models.IotHubScaleType + """ + + _validation = { + 'minimum': {'readonly': True, 'maximum': 1, 'minimum': 1}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'IotHubScaleType'}, + } + + def __init__(self, **kwargs): + super(IotHubCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class Resource(Model): + """The common properties of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class IotHubDescription(Resource): + """The description of the IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: The Etag field is *not* required. If it is provided in the + response body, it must also be provided as a header per the normal ETag + convention. + :type etag: str + :param properties: IotHub properties + :type properties: ~azure.mgmt.iothub.models.IotHubProperties + :param sku: Required. IotHub SKU info + :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IotHubProperties'}, + 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, + } + + def __init__(self, **kwargs): + super(IotHubDescription, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) + + +class IotHubLocationDescription(Model): + """Public representation of one of the locations where a resource is + provisioned. + + :param location: Azure Geo Regions + :type location: str + :param role: Specific Role assigned to this location. Possible values + include: 'primary', 'secondary' + :type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IotHubLocationDescription, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.role = kwargs.get('role', None) + + +class IotHubNameAvailabilityInfo(Model): + """The properties indicating whether a given IoT hub name is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: The value which indicates whether the provided name + is available. + :vartype name_available: bool + :ivar reason: The reason for unavailability. Possible values include: + 'Invalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.iothub.models.IotHubNameUnavailabilityReason + :param message: The detailed reason message. + :type message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'IotHubNameUnavailabilityReason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IotHubNameAvailabilityInfo, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = kwargs.get('message', None) + + +class IotHubProperties(Model): + """The properties of an IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param authorization_policies: The shared access policies you can use to + secure a connection to the IoT hub. + :type authorization_policies: + list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] + :param ip_filter_rules: The IP filter rules. + :type ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule] + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + :ivar state: The hub state. + :vartype state: str + :ivar host_name: The name of the host. + :vartype host_name: str + :param event_hub_endpoints: The Event Hub-compatible endpoint properties. + The only possible keys to this dictionary is events. This key has to be + present in the dictionary while making create or update calls for the IoT + hub. + :type event_hub_endpoints: dict[str, + ~azure.mgmt.iothub.models.EventHubProperties] + :param routing: + :type routing: ~azure.mgmt.iothub.models.RoutingProperties + :param storage_endpoints: The list of Azure Storage endpoints where you + can upload files. Currently you can configure only one Azure Storage + account and that MUST have its key as $default. Specifying more than one + storage account causes an error to be thrown. Not specifying a value for + this property when the enableFileUploadNotifications property is set to + True, causes an error to be thrown. + :type storage_endpoints: dict[str, + ~azure.mgmt.iothub.models.StorageEndpointProperties] + :param messaging_endpoints: The messaging endpoint properties for the file + upload notification queue. + :type messaging_endpoints: dict[str, + ~azure.mgmt.iothub.models.MessagingEndpointProperties] + :param enable_file_upload_notifications: If True, file upload + notifications are enabled. + :type enable_file_upload_notifications: bool + :param cloud_to_device: + :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties + :param comments: IoT hub comments. + :type comments: str + :param device_streams: The device streams properties of iothub. + :type device_streams: + ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams + :param features: The capabilities and features enabled for the IoT hub. + Possible values include: 'None', 'DeviceManagement' + :type features: str or ~azure.mgmt.iothub.models.Capabilities + :ivar locations: Primary and secondary location for iot hub + :vartype locations: + list[~azure.mgmt.iothub.models.IotHubLocationDescription] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'state': {'readonly': True}, + 'host_name': {'readonly': True}, + 'locations': {'readonly': True}, + } + + _attribute_map = { + 'authorization_policies': {'key': 'authorizationPolicies', 'type': '[SharedAccessSignatureAuthorizationRule]'}, + 'ip_filter_rules': {'key': 'ipFilterRules', 'type': '[IpFilterRule]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'event_hub_endpoints': {'key': 'eventHubEndpoints', 'type': '{EventHubProperties}'}, + 'routing': {'key': 'routing', 'type': 'RoutingProperties'}, + 'storage_endpoints': {'key': 'storageEndpoints', 'type': '{StorageEndpointProperties}'}, + 'messaging_endpoints': {'key': 'messagingEndpoints', 'type': '{MessagingEndpointProperties}'}, + 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, + 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, + 'features': {'key': 'features', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[IotHubLocationDescription]'}, + } + + def __init__(self, **kwargs): + super(IotHubProperties, self).__init__(**kwargs) + self.authorization_policies = kwargs.get('authorization_policies', None) + self.ip_filter_rules = kwargs.get('ip_filter_rules', None) + self.provisioning_state = None + self.state = None + self.host_name = None + self.event_hub_endpoints = kwargs.get('event_hub_endpoints', None) + self.routing = kwargs.get('routing', None) + self.storage_endpoints = kwargs.get('storage_endpoints', None) + self.messaging_endpoints = kwargs.get('messaging_endpoints', None) + self.enable_file_upload_notifications = kwargs.get('enable_file_upload_notifications', None) + self.cloud_to_device = kwargs.get('cloud_to_device', None) + self.comments = kwargs.get('comments', None) + self.device_streams = kwargs.get('device_streams', None) + self.features = kwargs.get('features', None) + self.locations = None + + +class IotHubPropertiesDeviceStreams(Model): + """The device streams properties of iothub. + + :param streaming_endpoints: List of Device Streams Endpoints. + :type streaming_endpoints: list[str] + """ + + _attribute_map = { + 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) + self.streaming_endpoints = kwargs.get('streaming_endpoints', None) + + +class IotHubQuotaMetricInfo(Model): + """Quota metrics properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the quota metric. + :vartype name: str + :ivar current_value: The current value for the quota metric. + :vartype current_value: long + :ivar max_value: The maximum value of the quota metric. + :vartype max_value: long + """ + + _validation = { + 'name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'max_value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'max_value': {'key': 'maxValue', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(IotHubQuotaMetricInfo, self).__init__(**kwargs) + self.name = None + self.current_value = None + self.max_value = None + + +class IotHubSkuDescription(Model): + """SKU properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :param sku: Required. The type of the resource. + :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo + :param capacity: Required. IotHub capacity + :type capacity: ~azure.mgmt.iothub.models.IotHubCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'required': True}, + 'capacity': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, + 'capacity': {'key': 'capacity', 'type': 'IotHubCapacity'}, + } + + def __init__(self, **kwargs): + super(IotHubSkuDescription, self).__init__(**kwargs) + self.resource_type = None + self.sku = kwargs.get('sku', None) + self.capacity = kwargs.get('capacity', None) + + +class IotHubSkuInfo(Model): + """Information about the SKU of the IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Possible values include: 'F1', + 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' + :type name: str or ~azure.mgmt.iothub.models.IotHubSku + :ivar tier: The billing tier for the IoT hub. Possible values include: + 'Free', 'Standard', 'Basic' + :vartype tier: str or ~azure.mgmt.iothub.models.IotHubSkuTier + :param capacity: The number of provisioned IoT Hub units. See: + https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. + :type capacity: long + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'IotHubSkuTier'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(IotHubSkuInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + self.capacity = kwargs.get('capacity', None) + + +class IpFilterRule(Model): + """The IP filter rules for the IoT hub. + + All required parameters must be populated in order to send to Azure. + + :param filter_name: Required. The name of the IP filter rule. + :type filter_name: str + :param action: Required. The desired action for requests captured by this + rule. Possible values include: 'Accept', 'Reject' + :type action: str or ~azure.mgmt.iothub.models.IpFilterActionType + :param ip_mask: Required. A string that contains the IP address range in + CIDR notation for the rule. + :type ip_mask: str + """ + + _validation = { + 'filter_name': {'required': True}, + 'action': {'required': True}, + 'ip_mask': {'required': True}, + } + + _attribute_map = { + 'filter_name': {'key': 'filterName', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'IpFilterActionType'}, + 'ip_mask': {'key': 'ipMask', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IpFilterRule, self).__init__(**kwargs) + self.filter_name = kwargs.get('filter_name', None) + self.action = kwargs.get('action', None) + self.ip_mask = kwargs.get('ip_mask', None) + + +class JobResponse(Model): + """The properties of the Job Response object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar job_id: The job identifier. + :vartype job_id: str + :ivar start_time_utc: The start time of the job. + :vartype start_time_utc: datetime + :ivar end_time_utc: The time the job stopped processing. + :vartype end_time_utc: datetime + :ivar type: The type of the job. Possible values include: 'unknown', + 'export', 'import', 'backup', 'readDeviceProperties', + 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', + 'factoryResetDevice', 'firmwareUpdate' + :vartype type: str or ~azure.mgmt.iothub.models.JobType + :ivar status: The status of the job. Possible values include: 'unknown', + 'enqueued', 'running', 'completed', 'failed', 'cancelled' + :vartype status: str or ~azure.mgmt.iothub.models.JobStatus + :ivar failure_reason: If status == failed, this string containing the + reason for the failure. + :vartype failure_reason: str + :ivar status_message: The status message for the job. + :vartype status_message: str + :ivar parent_job_id: The job identifier of the parent job, if any. + :vartype parent_job_id: str + """ + + _validation = { + 'job_id': {'readonly': True}, + 'start_time_utc': {'readonly': True}, + 'end_time_utc': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'failure_reason': {'readonly': True}, + 'status_message': {'readonly': True}, + 'parent_job_id': {'readonly': True}, + } + + _attribute_map = { + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'rfc-1123'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'rfc-1123'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'JobStatus'}, + 'failure_reason': {'key': 'failureReason', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'parent_job_id': {'key': 'parentJobId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(JobResponse, self).__init__(**kwargs) + self.job_id = None + self.start_time_utc = None + self.end_time_utc = None + self.type = None + self.status = None + self.failure_reason = None + self.status_message = None + self.parent_job_id = None + + +class MatchedRoute(Model): + """Routes that matched. + + :param properties: Properties of routes that matched + :type properties: ~azure.mgmt.iothub.models.RouteProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RouteProperties'}, + } + + def __init__(self, **kwargs): + super(MatchedRoute, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class MessagingEndpointProperties(Model): + """The properties of the messaging endpoints used by this IoT hub. + + :param lock_duration_as_iso8601: The lock duration. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + :type lock_duration_as_iso8601: timedelta + :param ttl_as_iso8601: The period of time for which a message is available + to consume before it is expired by the IoT hub. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + :type ttl_as_iso8601: timedelta + :param max_delivery_count: The number of times the IoT hub attempts to + deliver a message. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + :type max_delivery_count: int + """ + + _validation = { + 'max_delivery_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, + 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, + 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(MessagingEndpointProperties, self).__init__(**kwargs) + self.lock_duration_as_iso8601 = kwargs.get('lock_duration_as_iso8601', None) + self.ttl_as_iso8601 = kwargs.get('ttl_as_iso8601', None) + self.max_delivery_count = kwargs.get('max_delivery_count', None) + + +class Name(Model): + """Name of Iot Hub type. + + :param value: IotHub type + :type value: str + :param localized_value: Localized value of name + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Name, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class Operation(Model): + """IoT Hub REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{read | write | action | + delete} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.iothub.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft Devices + :vartype provider: str + :ivar resource: Resource Type: IotHubs + :vartype resource: str + :ivar operation: Name of the operation + :vartype operation: str + :ivar description: Description of the operation + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationInputs(Model): + """Input values. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the IoT hub to check. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationInputs, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class RegistryStatistics(Model): + """Identity registry statistics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar total_device_count: The total count of devices in the identity + registry. + :vartype total_device_count: long + :ivar enabled_device_count: The count of enabled devices in the identity + registry. + :vartype enabled_device_count: long + :ivar disabled_device_count: The count of disabled devices in the identity + registry. + :vartype disabled_device_count: long + """ + + _validation = { + 'total_device_count': {'readonly': True}, + 'enabled_device_count': {'readonly': True}, + 'disabled_device_count': {'readonly': True}, + } + + _attribute_map = { + 'total_device_count': {'key': 'totalDeviceCount', 'type': 'long'}, + 'enabled_device_count': {'key': 'enabledDeviceCount', 'type': 'long'}, + 'disabled_device_count': {'key': 'disabledDeviceCount', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(RegistryStatistics, self).__init__(**kwargs) + self.total_device_count = None + self.enabled_device_count = None + self.disabled_device_count = None + + +class RouteCompilationError(Model): + """Compilation error when evaluating route. + + :param message: Route error message + :type message: str + :param severity: Severity of the route error. Possible values include: + 'error', 'warning' + :type severity: str or ~azure.mgmt.iothub.models.RouteErrorSeverity + :param location: Location where the route error happened + :type location: ~azure.mgmt.iothub.models.RouteErrorRange + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'RouteErrorRange'}, + } + + def __init__(self, **kwargs): + super(RouteCompilationError, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.severity = kwargs.get('severity', None) + self.location = kwargs.get('location', None) + + +class RouteErrorPosition(Model): + """Position where the route error happened. + + :param line: Line where the route error happened + :type line: int + :param column: Column where the route error happened + :type column: int + """ + + _attribute_map = { + 'line': {'key': 'line', 'type': 'int'}, + 'column': {'key': 'column', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RouteErrorPosition, self).__init__(**kwargs) + self.line = kwargs.get('line', None) + self.column = kwargs.get('column', None) + + +class RouteErrorRange(Model): + """Range of route errors. + + :param start: Start where the route error happened + :type start: ~azure.mgmt.iothub.models.RouteErrorPosition + :param end: End where the route error happened + :type end: ~azure.mgmt.iothub.models.RouteErrorPosition + """ + + _attribute_map = { + 'start': {'key': 'start', 'type': 'RouteErrorPosition'}, + 'end': {'key': 'end', 'type': 'RouteErrorPosition'}, + } + + def __init__(self, **kwargs): + super(RouteErrorRange, self).__init__(**kwargs) + self.start = kwargs.get('start', None) + self.end = kwargs.get('end', None) + + +class RouteProperties(Model): + """The properties of a routing rule that your IoT hub uses to route messages + to endpoints. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the route. The name can only include + alphanumeric characters, periods, underscores, hyphens, has a maximum + length of 64 characters, and must be unique. + :type name: str + :param source: Required. The source that the routing rule is to be applied + to, such as DeviceMessages. Possible values include: 'Invalid', + 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', + 'DeviceJobLifecycleEvents' + :type source: str or ~azure.mgmt.iothub.models.RoutingSource + :param condition: The condition that is evaluated to apply the routing + rule. If no condition is provided, it evaluates to true by default. For + grammar, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + :type condition: str + :param endpoint_names: Required. The list of endpoints to which messages + that satisfy the condition are routed. Currently only one endpoint is + allowed. + :type endpoint_names: list[str] + :param is_enabled: Required. Used to specify whether a route is enabled. + :type is_enabled: bool + """ + + _validation = { + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + 'source': {'required': True}, + 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'condition': {'key': 'condition', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(RouteProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.source = kwargs.get('source', None) + self.condition = kwargs.get('condition', None) + self.endpoint_names = kwargs.get('endpoint_names', None) + self.is_enabled = kwargs.get('is_enabled', None) + + +class RoutingEndpoints(Model): + """The properties related to the custom endpoints to which your IoT hub routes + messages based on the routing rules. A maximum of 10 custom endpoints are + allowed across all endpoint types for paid hubs and only 1 custom endpoint + is allowed across all endpoint types for free hubs. + + :param service_bus_queues: The list of Service Bus queue endpoints that + IoT hub routes the messages to, based on the routing rules. + :type service_bus_queues: + list[~azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties] + :param service_bus_topics: The list of Service Bus topic endpoints that + the IoT hub routes the messages to, based on the routing rules. + :type service_bus_topics: + list[~azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties] + :param event_hubs: The list of Event Hubs endpoints that IoT hub routes + messages to, based on the routing rules. This list does not include the + built-in Event Hubs endpoint. + :type event_hubs: + list[~azure.mgmt.iothub.models.RoutingEventHubProperties] + :param storage_containers: The list of storage container endpoints that + IoT hub routes messages to, based on the routing rules. + :type storage_containers: + list[~azure.mgmt.iothub.models.RoutingStorageContainerProperties] + """ + + _attribute_map = { + 'service_bus_queues': {'key': 'serviceBusQueues', 'type': '[RoutingServiceBusQueueEndpointProperties]'}, + 'service_bus_topics': {'key': 'serviceBusTopics', 'type': '[RoutingServiceBusTopicEndpointProperties]'}, + 'event_hubs': {'key': 'eventHubs', 'type': '[RoutingEventHubProperties]'}, + 'storage_containers': {'key': 'storageContainers', 'type': '[RoutingStorageContainerProperties]'}, + } + + def __init__(self, **kwargs): + super(RoutingEndpoints, self).__init__(**kwargs) + self.service_bus_queues = kwargs.get('service_bus_queues', None) + self.service_bus_topics = kwargs.get('service_bus_topics', None) + self.event_hubs = kwargs.get('event_hubs', None) + self.storage_containers = kwargs.get('storage_containers', None) + + +class RoutingEventHubProperties(Model): + """The properties related to an event hub endpoint. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the event hub + endpoint. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. + :type name: str + :param subscription_id: The subscription identifier of the event hub + endpoint. + :type subscription_id: str + :param resource_group: The name of the resource group of the event hub + endpoint. + :type resource_group: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoutingEventHubProperties, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.name = kwargs.get('name', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + + +class RoutingMessage(Model): + """Routing message. + + :param body: Body of routing message + :type body: str + :param app_properties: App properties + :type app_properties: dict[str, str] + :param system_properties: System properties + :type system_properties: dict[str, str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'str'}, + 'app_properties': {'key': 'appProperties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(RoutingMessage, self).__init__(**kwargs) + self.body = kwargs.get('body', None) + self.app_properties = kwargs.get('app_properties', None) + self.system_properties = kwargs.get('system_properties', None) + + +class RoutingProperties(Model): + """The routing related properties of the IoT hub. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging. + + :param endpoints: + :type endpoints: ~azure.mgmt.iothub.models.RoutingEndpoints + :param routes: The list of user-provided routing rules that the IoT hub + uses to route messages to built-in and custom endpoints. A maximum of 100 + routing rules are allowed for paid hubs and a maximum of 5 routing rules + are allowed for free hubs. + :type routes: list[~azure.mgmt.iothub.models.RouteProperties] + :param fallback_route: The properties of the route that is used as a + fall-back route when none of the conditions specified in the 'routes' + section are met. This is an optional parameter. When this property is not + set, the messages which do not meet any of the conditions specified in the + 'routes' section get routed to the built-in eventhub endpoint. + :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties + :param enrichments: The list of user-provided enrichments that the IoT hub + applies to messages to be delivered to built-in and custom endpoints. See: + https://aka.ms/iotmsgenrich + :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] + """ + + _attribute_map = { + 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, + 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, + 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, + 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, + } + + def __init__(self, **kwargs): + super(RoutingProperties, self).__init__(**kwargs) + self.endpoints = kwargs.get('endpoints', None) + self.routes = kwargs.get('routes', None) + self.fallback_route = kwargs.get('fallback_route', None) + self.enrichments = kwargs.get('enrichments', None) + + +class RoutingServiceBusQueueEndpointProperties(Model): + """The properties related to service bus queue endpoint types. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the service + bus queue endpoint. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. The name need not be the same as the actual + queue name. + :type name: str + :param subscription_id: The subscription identifier of the service bus + queue endpoint. + :type subscription_id: str + :param resource_group: The name of the resource group of the service bus + queue endpoint. + :type resource_group: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoutingServiceBusQueueEndpointProperties, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.name = kwargs.get('name', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + + +class RoutingServiceBusTopicEndpointProperties(Model): + """The properties related to service bus topic endpoint types. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the service + bus topic endpoint. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. The name need not be the same as the actual + topic name. + :type name: str + :param subscription_id: The subscription identifier of the service bus + topic endpoint. + :type subscription_id: str + :param resource_group: The name of the resource group of the service bus + topic endpoint. + :type resource_group: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoutingServiceBusTopicEndpointProperties, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.name = kwargs.get('name', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + + +class RoutingStorageContainerProperties(Model): + """The properties related to a storage container endpoint. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the storage + account. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. + :type name: str + :param subscription_id: The subscription identifier of the storage + account. + :type subscription_id: str + :param resource_group: The name of the resource group of the storage + account. + :type resource_group: str + :param container_name: Required. The name of storage container in the + storage account. + :type container_name: str + :param file_name_format: File name format for the blob. Default format is + {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are + mandatory but can be reordered. + :type file_name_format: str + :param batch_frequency_in_seconds: Time interval at which blobs are + written to storage. Value should be between 60 and 720 seconds. Default + value is 300 seconds. + :type batch_frequency_in_seconds: int + :param max_chunk_size_in_bytes: Maximum number of bytes for each blob + written to storage. Value should be between 10485760(10MB) and + 524288000(500MB). Default value is 314572800(300MB). + :type max_chunk_size_in_bytes: int + :param encoding: Encoding that is used to serialize messages to blobs. + Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is + 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON' + :type encoding: str or ~azure.mgmt.iothub.models.enum + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + 'container_name': {'required': True}, + 'batch_frequency_in_seconds': {'maximum': 720, 'minimum': 60}, + 'max_chunk_size_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'file_name_format': {'key': 'fileNameFormat', 'type': 'str'}, + 'batch_frequency_in_seconds': {'key': 'batchFrequencyInSeconds', 'type': 'int'}, + 'max_chunk_size_in_bytes': {'key': 'maxChunkSizeInBytes', 'type': 'int'}, + 'encoding': {'key': 'encoding', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoutingStorageContainerProperties, self).__init__(**kwargs) + self.connection_string = kwargs.get('connection_string', None) + self.name = kwargs.get('name', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.container_name = kwargs.get('container_name', None) + self.file_name_format = kwargs.get('file_name_format', None) + self.batch_frequency_in_seconds = kwargs.get('batch_frequency_in_seconds', None) + self.max_chunk_size_in_bytes = kwargs.get('max_chunk_size_in_bytes', None) + self.encoding = kwargs.get('encoding', None) + + +class RoutingTwin(Model): + """Twin reference input parameter. This is an optional parameter. + + :param tags: Twin Tags + :type tags: object + :param properties: + :type properties: ~azure.mgmt.iothub.models.RoutingTwinProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'RoutingTwinProperties'}, + } + + def __init__(self, **kwargs): + super(RoutingTwin, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) + + +class RoutingTwinProperties(Model): + """RoutingTwinProperties. + + :param desired: Twin desired properties + :type desired: object + :param reported: Twin desired properties + :type reported: object + """ + + _attribute_map = { + 'desired': {'key': 'desired', 'type': 'object'}, + 'reported': {'key': 'reported', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(RoutingTwinProperties, self).__init__(**kwargs) + self.desired = kwargs.get('desired', None) + self.reported = kwargs.get('reported', None) + + +class SharedAccessSignatureAuthorizationRule(Model): + """The properties of an IoT hub shared access policy. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The name of the shared access policy. + :type key_name: str + :param primary_key: The primary key. + :type primary_key: str + :param secondary_key: The secondary key. + :type secondary_key: str + :param rights: Required. The permissions assigned to the shared access + policy. Possible values include: 'RegistryRead', 'RegistryWrite', + 'ServiceConnect', 'DeviceConnect', 'RegistryRead, RegistryWrite', + 'RegistryRead, ServiceConnect', 'RegistryRead, DeviceConnect', + 'RegistryWrite, ServiceConnect', 'RegistryWrite, DeviceConnect', + 'ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, + ServiceConnect', 'RegistryRead, RegistryWrite, DeviceConnect', + 'RegistryRead, ServiceConnect, DeviceConnect', 'RegistryWrite, + ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, + ServiceConnect, DeviceConnect' + :type rights: str or ~azure.mgmt.iothub.models.AccessRights + """ + + _validation = { + 'key_name': {'required': True}, + 'rights': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'rights': {'key': 'rights', 'type': 'AccessRights'}, + } + + def __init__(self, **kwargs): + super(SharedAccessSignatureAuthorizationRule, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.rights = kwargs.get('rights', None) + + +class StorageEndpointProperties(Model): + """The properties of the Azure Storage endpoint for file upload. + + All required parameters must be populated in order to send to Azure. + + :param sas_ttl_as_iso8601: The period of time for which the SAS URI + generated by IoT Hub for file upload is valid. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. + :type sas_ttl_as_iso8601: timedelta + :param connection_string: Required. The connection string for the Azure + Storage account to which files are uploaded. + :type connection_string: str + :param container_name: Required. The name of the root container where you + upload files. The container need not exist but should be creatable using + the connectionString specified. + :type container_name: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'sas_ttl_as_iso8601': {'key': 'sasTtlAsIso8601', 'type': 'duration'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageEndpointProperties, self).__init__(**kwargs) + self.sas_ttl_as_iso8601 = kwargs.get('sas_ttl_as_iso8601', None) + self.connection_string = kwargs.get('connection_string', None) + self.container_name = kwargs.get('container_name', None) + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags on an IoT Hub instance. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TagsResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class TestAllRoutesInput(Model): + """Input for testing all routes. + + :param routing_source: Routing source. Possible values include: 'Invalid', + 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', + 'DeviceJobLifecycleEvents' + :type routing_source: str or ~azure.mgmt.iothub.models.RoutingSource + :param message: Routing message + :type message: ~azure.mgmt.iothub.models.RoutingMessage + :param twin: Routing Twin Reference + :type twin: ~azure.mgmt.iothub.models.RoutingTwin + """ + + _attribute_map = { + 'routing_source': {'key': 'routingSource', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'RoutingMessage'}, + 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, + } + + def __init__(self, **kwargs): + super(TestAllRoutesInput, self).__init__(**kwargs) + self.routing_source = kwargs.get('routing_source', None) + self.message = kwargs.get('message', None) + self.twin = kwargs.get('twin', None) + + +class TestAllRoutesResult(Model): + """Result of testing all routes. + + :param routes: JSON-serialized array of matched routes + :type routes: list[~azure.mgmt.iothub.models.MatchedRoute] + """ + + _attribute_map = { + 'routes': {'key': 'routes', 'type': '[MatchedRoute]'}, + } + + def __init__(self, **kwargs): + super(TestAllRoutesResult, self).__init__(**kwargs) + self.routes = kwargs.get('routes', None) + + +class TestRouteInput(Model): + """Input for testing route. + + All required parameters must be populated in order to send to Azure. + + :param message: Routing message + :type message: ~azure.mgmt.iothub.models.RoutingMessage + :param route: Required. Route properties + :type route: ~azure.mgmt.iothub.models.RouteProperties + :param twin: Routing Twin Reference + :type twin: ~azure.mgmt.iothub.models.RoutingTwin + """ + + _validation = { + 'route': {'required': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'RoutingMessage'}, + 'route': {'key': 'route', 'type': 'RouteProperties'}, + 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, + } + + def __init__(self, **kwargs): + super(TestRouteInput, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.route = kwargs.get('route', None) + self.twin = kwargs.get('twin', None) + + +class TestRouteResult(Model): + """Result of testing one route. + + :param result: Result of testing route. Possible values include: + 'undefined', 'false', 'true' + :type result: str or ~azure.mgmt.iothub.models.TestResultStatus + :param details: Detailed result of testing route + :type details: ~azure.mgmt.iothub.models.TestRouteResultDetails + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'TestRouteResultDetails'}, + } + + def __init__(self, **kwargs): + super(TestRouteResult, self).__init__(**kwargs) + self.result = kwargs.get('result', None) + self.details = kwargs.get('details', None) + + +class TestRouteResultDetails(Model): + """Detailed result of testing a route. + + :param compilation_errors: JSON-serialized list of route compilation + errors + :type compilation_errors: + list[~azure.mgmt.iothub.models.RouteCompilationError] + """ + + _attribute_map = { + 'compilation_errors': {'key': 'compilationErrors', 'type': '[RouteCompilationError]'}, + } + + def __init__(self, **kwargs): + super(TestRouteResultDetails, self).__init__(**kwargs) + self.compilation_errors = kwargs.get('compilation_errors', None) + + +class UserSubscriptionQuota(Model): + """User subscription quota response. + + :param id: IotHub type id + :type id: str + :param type: Response type + :type type: str + :param unit: Unit of IotHub type + :type unit: str + :param current_value: Current number of IotHub type + :type current_value: int + :param limit: Numerical limit on IotHub type + :type limit: int + :param name: IotHub type + :type name: ~azure.mgmt.iothub.models.Name + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'Name'}, + } + + def __init__(self, **kwargs): + super(UserSubscriptionQuota, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.unit = kwargs.get('unit', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + + +class UserSubscriptionQuotaListResult(Model): + """Json-serialized array of User subscription quota response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param value: + :type value: list[~azure.mgmt.iothub.models.UserSubscriptionQuota] + :ivar next_link: + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UserSubscriptionQuota]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserSubscriptionQuotaListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py new file mode 100644 index 000000000000..7de261f3b8b3 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py @@ -0,0 +1,2107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class CertificateBodyDescription(Model): + """The JSON-serialized X509 Certificate. + + :param certificate: base-64 representation of the X509 leaf certificate + .cer file or just .pem file content. + :type certificate: str + """ + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, *, certificate: str=None, **kwargs) -> None: + super(CertificateBodyDescription, self).__init__(**kwargs) + self.certificate = certificate + + +class CertificateDescription(Model): + """The X509 Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: + :type properties: ~azure.mgmt.iothub.models.CertificateProperties + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The name of the certificate. + :vartype name: str + :ivar etag: The entity tag. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CertificateDescription, self).__init__(**kwargs) + self.properties = properties + self.id = None + self.name = None + self.etag = None + self.type = None + + +class CertificateListDescription(Model): + """The JSON-serialized array of Certificate objects. + + :param value: The array of Certificate objects. + :type value: list[~azure.mgmt.iothub.models.CertificateDescription] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateDescription]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(CertificateListDescription, self).__init__(**kwargs) + self.value = value + + +class CertificateProperties(Model): + """The description of an X509 CA Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subject: The certificate's subject name. + :vartype subject: str + :ivar expiry: The certificate's expiration date and time. + :vartype expiry: datetime + :ivar thumbprint: The certificate's thumbprint. + :vartype thumbprint: str + :ivar is_verified: Determines whether certificate has been verified. + :vartype is_verified: bool + :ivar created: The certificate's create date and time. + :vartype created: datetime + :ivar updated: The certificate's last update date and time. + :vartype updated: datetime + :param certificate: The certificate content + :type certificate: str + """ + + _validation = { + 'subject': {'readonly': True}, + 'expiry': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'is_verified': {'readonly': True}, + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'subject': {'key': 'subject', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'is_verified': {'key': 'isVerified', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'rfc-1123'}, + 'updated': {'key': 'updated', 'type': 'rfc-1123'}, + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, *, certificate: str=None, **kwargs) -> None: + super(CertificateProperties, self).__init__(**kwargs) + self.subject = None + self.expiry = None + self.thumbprint = None + self.is_verified = None + self.created = None + self.updated = None + self.certificate = certificate + + +class CertificatePropertiesWithNonce(Model): + """The description of an X509 CA Certificate including the challenge nonce + issued for the Proof-Of-Possession flow. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subject: The certificate's subject name. + :vartype subject: str + :ivar expiry: The certificate's expiration date and time. + :vartype expiry: datetime + :ivar thumbprint: The certificate's thumbprint. + :vartype thumbprint: str + :ivar is_verified: Determines whether certificate has been verified. + :vartype is_verified: bool + :ivar created: The certificate's create date and time. + :vartype created: datetime + :ivar updated: The certificate's last update date and time. + :vartype updated: datetime + :ivar verification_code: The certificate's verification code that will be + used for proof of possession. + :vartype verification_code: str + :ivar certificate: The certificate content + :vartype certificate: str + """ + + _validation = { + 'subject': {'readonly': True}, + 'expiry': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'is_verified': {'readonly': True}, + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + 'verification_code': {'readonly': True}, + 'certificate': {'readonly': True}, + } + + _attribute_map = { + 'subject': {'key': 'subject', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'is_verified': {'key': 'isVerified', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'rfc-1123'}, + 'updated': {'key': 'updated', 'type': 'rfc-1123'}, + 'verification_code': {'key': 'verificationCode', 'type': 'str'}, + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificatePropertiesWithNonce, self).__init__(**kwargs) + self.subject = None + self.expiry = None + self.thumbprint = None + self.is_verified = None + self.created = None + self.updated = None + self.verification_code = None + self.certificate = None + + +class CertificateVerificationDescription(Model): + """The JSON-serialized leaf certificate. + + :param certificate: base-64 representation of X509 certificate .cer file + or just .pem file content. + :type certificate: str + """ + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, *, certificate: str=None, **kwargs) -> None: + super(CertificateVerificationDescription, self).__init__(**kwargs) + self.certificate = certificate + + +class CertificateWithNonceDescription(Model): + """The X509 Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: + :type properties: ~azure.mgmt.iothub.models.CertificatePropertiesWithNonce + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The name of the certificate. + :vartype name: str + :ivar etag: The entity tag. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'CertificatePropertiesWithNonce'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CertificateWithNonceDescription, self).__init__(**kwargs) + self.properties = properties + self.id = None + self.name = None + self.etag = None + self.type = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CloudToDeviceProperties(Model): + """The IoT hub cloud-to-device messaging properties. + + :param max_delivery_count: The max delivery count for cloud-to-device + messages in the device queue. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type max_delivery_count: int + :param default_ttl_as_iso8601: The default time to live for + cloud-to-device messages in the device queue. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type default_ttl_as_iso8601: timedelta + :param feedback: + :type feedback: ~azure.mgmt.iothub.models.FeedbackProperties + """ + + _validation = { + 'max_delivery_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, + 'default_ttl_as_iso8601': {'key': 'defaultTtlAsIso8601', 'type': 'duration'}, + 'feedback': {'key': 'feedback', 'type': 'FeedbackProperties'}, + } + + def __init__(self, *, max_delivery_count: int=None, default_ttl_as_iso8601=None, feedback=None, **kwargs) -> None: + super(CloudToDeviceProperties, self).__init__(**kwargs) + self.max_delivery_count = max_delivery_count + self.default_ttl_as_iso8601 = default_ttl_as_iso8601 + self.feedback = feedback + + +class EndpointHealthData(Model): + """The health data for an endpoint. + + :param endpoint_id: Id of the endpoint + :type endpoint_id: str + :param health_status: Health statuses have following meanings. The + 'healthy' status shows that the endpoint is accepting messages as + expected. The 'unhealthy' status shows that the endpoint is not accepting + messages as expected and IoT Hub is retrying to send data to this + endpoint. The status of an unhealthy endpoint will be updated to healthy + when IoT Hub has established an eventually consistent state of health. The + 'dead' status shows that the endpoint is not accepting messages, after IoT + Hub retried sending messages for the retrial period. See IoT Hub metrics + to identify errors and monitor issues with endpoints. The 'unknown' status + shows that the IoT Hub has not established a connection with the endpoint. + No messages have been delivered to or rejected from this endpoint. + Possible values include: 'unknown', 'healthy', 'unhealthy', 'dead' + :type health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus + """ + + _attribute_map = { + 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, + 'health_status': {'key': 'healthStatus', 'type': 'str'}, + } + + def __init__(self, *, endpoint_id: str=None, health_status=None, **kwargs) -> None: + super(EndpointHealthData, self).__init__(**kwargs) + self.endpoint_id = endpoint_id + self.health_status = health_status + + +class EnrichmentProperties(Model): + """The properties of an enrichment that your IoT hub applies to messages + delivered to endpoints. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key or name for the enrichment property. + :type key: str + :param value: Required. The value for the enrichment property. + :type value: str + :param endpoint_names: Required. The list of endpoints for which the + enrichment is applied to the message. + :type endpoint_names: list[str] + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + 'endpoint_names': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + } + + def __init__(self, *, key: str, value: str, endpoint_names, **kwargs) -> None: + super(EnrichmentProperties, self).__init__(**kwargs) + self.key = key + self.value = value + self.endpoint_names = endpoint_names + + +class ErrorDetails(Model): + """Error details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar http_status_code: The HTTP status code. + :vartype http_status_code: str + :ivar message: The error message. + :vartype message: str + :ivar details: The error details. + :vartype details: str + """ + + _validation = { + 'code': {'readonly': True}, + 'http_status_code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'http_status_code': {'key': 'httpStatusCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.http_status_code = None + self.message = None + self.details = None + + +class ErrorDetailsException(HttpOperationError): + """Server responsed with exception of type: 'ErrorDetails'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) + + +class EventHubConsumerGroupInfo(Model): + """The properties of the EventHubConsumerGroupInfo object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: The tags. + :type properties: dict[str, str] + :ivar id: The Event Hub-compatible consumer group identifier. + :vartype id: str + :ivar name: The Event Hub-compatible consumer group name. + :vartype name: str + :ivar type: the resource type. + :vartype type: str + :ivar etag: The etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(EventHubConsumerGroupInfo, self).__init__(**kwargs) + self.properties = properties + self.id = None + self.name = None + self.type = None + self.etag = None + + +class EventHubProperties(Model): + """The properties of the provisioned Event Hub-compatible endpoint used by the + IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param retention_time_in_days: The retention time for device-to-cloud + messages in days. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages + :type retention_time_in_days: long + :param partition_count: The number of partitions for receiving + device-to-cloud messages in the Event Hub-compatible endpoint. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. + :type partition_count: int + :ivar partition_ids: The partition ids in the Event Hub-compatible + endpoint. + :vartype partition_ids: list[str] + :ivar path: The Event Hub-compatible name. + :vartype path: str + :ivar endpoint: The Event Hub-compatible endpoint. + :vartype endpoint: str + """ + + _validation = { + 'partition_ids': {'readonly': True}, + 'path': {'readonly': True}, + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'retention_time_in_days': {'key': 'retentionTimeInDays', 'type': 'long'}, + 'partition_count': {'key': 'partitionCount', 'type': 'int'}, + 'partition_ids': {'key': 'partitionIds', 'type': '[str]'}, + 'path': {'key': 'path', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__(self, *, retention_time_in_days: int=None, partition_count: int=None, **kwargs) -> None: + super(EventHubProperties, self).__init__(**kwargs) + self.retention_time_in_days = retention_time_in_days + self.partition_count = partition_count + self.partition_ids = None + self.path = None + self.endpoint = None + + +class ExportDevicesRequest(Model): + """Use to provide parameters when requesting an export of all devices in the + IoT hub. + + All required parameters must be populated in order to send to Azure. + + :param export_blob_container_uri: Required. The export blob container URI. + :type export_blob_container_uri: str + :param exclude_keys: Required. The value indicating whether keys should be + excluded during export. + :type exclude_keys: bool + """ + + _validation = { + 'export_blob_container_uri': {'required': True}, + 'exclude_keys': {'required': True}, + } + + _attribute_map = { + 'export_blob_container_uri': {'key': 'exportBlobContainerUri', 'type': 'str'}, + 'exclude_keys': {'key': 'excludeKeys', 'type': 'bool'}, + } + + def __init__(self, *, export_blob_container_uri: str, exclude_keys: bool, **kwargs) -> None: + super(ExportDevicesRequest, self).__init__(**kwargs) + self.export_blob_container_uri = export_blob_container_uri + self.exclude_keys = exclude_keys + + +class FailoverInput(Model): + """Use to provide failover region when requesting manual Failover for a hub. + + All required parameters must be populated in order to send to Azure. + + :param failover_region: Required. Region the hub will be failed over to + :type failover_region: str + """ + + _validation = { + 'failover_region': {'required': True}, + } + + _attribute_map = { + 'failover_region': {'key': 'failoverRegion', 'type': 'str'}, + } + + def __init__(self, *, failover_region: str, **kwargs) -> None: + super(FailoverInput, self).__init__(**kwargs) + self.failover_region = failover_region + + +class FallbackRouteProperties(Model): + """The properties of the fallback route. IoT Hub uses these properties when it + routes messages to the fallback endpoint. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the route. The name can only include alphanumeric + characters, periods, underscores, hyphens, has a maximum length of 64 + characters, and must be unique. + :type name: str + :ivar source: Required. The source to which the routing rule is to be + applied to. For example, DeviceMessages. Default value: "DeviceMessages" . + :vartype source: str + :param condition: The condition which is evaluated in order to apply the + fallback route. If the condition is not provided it will evaluate to true + by default. For grammar, See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + :type condition: str + :param endpoint_names: Required. The list of endpoints to which the + messages that satisfy the condition are routed to. Currently only 1 + endpoint is allowed. + :type endpoint_names: list[str] + :param is_enabled: Required. Used to specify whether the fallback route is + enabled. + :type is_enabled: bool + """ + + _validation = { + 'source': {'required': True, 'constant': True}, + 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'condition': {'key': 'condition', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + source = "DeviceMessages" + + def __init__(self, *, endpoint_names, is_enabled: bool, name: str=None, condition: str=None, **kwargs) -> None: + super(FallbackRouteProperties, self).__init__(**kwargs) + self.name = name + self.condition = condition + self.endpoint_names = endpoint_names + self.is_enabled = is_enabled + + +class FeedbackProperties(Model): + """The properties of the feedback queue for cloud-to-device messages. + + :param lock_duration_as_iso8601: The lock duration for the feedback queue. + See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type lock_duration_as_iso8601: timedelta + :param ttl_as_iso8601: The period of time for which a message is available + to consume before it is expired by the IoT hub. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type ttl_as_iso8601: timedelta + :param max_delivery_count: The number of times the IoT hub attempts to + deliver a message on the feedback queue. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. + :type max_delivery_count: int + """ + + _validation = { + 'max_delivery_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, + 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, + 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, + } + + def __init__(self, *, lock_duration_as_iso8601=None, ttl_as_iso8601=None, max_delivery_count: int=None, **kwargs) -> None: + super(FeedbackProperties, self).__init__(**kwargs) + self.lock_duration_as_iso8601 = lock_duration_as_iso8601 + self.ttl_as_iso8601 = ttl_as_iso8601 + self.max_delivery_count = max_delivery_count + + +class ImportDevicesRequest(Model): + """Use to provide parameters when requesting an import of all devices in the + hub. + + All required parameters must be populated in order to send to Azure. + + :param input_blob_container_uri: Required. The input blob container URI. + :type input_blob_container_uri: str + :param output_blob_container_uri: Required. The output blob container URI. + :type output_blob_container_uri: str + """ + + _validation = { + 'input_blob_container_uri': {'required': True}, + 'output_blob_container_uri': {'required': True}, + } + + _attribute_map = { + 'input_blob_container_uri': {'key': 'inputBlobContainerUri', 'type': 'str'}, + 'output_blob_container_uri': {'key': 'outputBlobContainerUri', 'type': 'str'}, + } + + def __init__(self, *, input_blob_container_uri: str, output_blob_container_uri: str, **kwargs) -> None: + super(ImportDevicesRequest, self).__init__(**kwargs) + self.input_blob_container_uri = input_blob_container_uri + self.output_blob_container_uri = output_blob_container_uri + + +class IotHubCapacity(Model): + """IoT Hub capacity information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum number of units. + :vartype minimum: long + :ivar maximum: The maximum number of units. + :vartype maximum: long + :ivar default: The default number of units. + :vartype default: long + :ivar scale_type: The type of the scaling enabled. Possible values + include: 'Automatic', 'Manual', 'None' + :vartype scale_type: str or ~azure.mgmt.iothub.models.IotHubScaleType + """ + + _validation = { + 'minimum': {'readonly': True, 'maximum': 1, 'minimum': 1}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'IotHubScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(IotHubCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None + + +class Resource(Model): + """The common properties of an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class IotHubDescription(Resource): + """The description of the IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: The Etag field is *not* required. If it is provided in the + response body, it must also be provided as a header per the normal ETag + convention. + :type etag: str + :param properties: IotHub properties + :type properties: ~azure.mgmt.iothub.models.IotHubProperties + :param sku: Required. IotHub SKU info + :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IotHubProperties'}, + 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, + } + + def __init__(self, *, location: str, sku, tags=None, etag: str=None, properties=None, **kwargs) -> None: + super(IotHubDescription, self).__init__(location=location, tags=tags, **kwargs) + self.etag = etag + self.properties = properties + self.sku = sku + + +class IotHubLocationDescription(Model): + """Public representation of one of the locations where a resource is + provisioned. + + :param location: Azure Geo Regions + :type location: str + :param role: Specific Role assigned to this location. Possible values + include: 'primary', 'secondary' + :type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, role=None, **kwargs) -> None: + super(IotHubLocationDescription, self).__init__(**kwargs) + self.location = location + self.role = role + + +class IotHubNameAvailabilityInfo(Model): + """The properties indicating whether a given IoT hub name is available. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: The value which indicates whether the provided name + is available. + :vartype name_available: bool + :ivar reason: The reason for unavailability. Possible values include: + 'Invalid', 'AlreadyExists' + :vartype reason: str or + ~azure.mgmt.iothub.models.IotHubNameUnavailabilityReason + :param message: The detailed reason message. + :type message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'IotHubNameUnavailabilityReason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, message: str=None, **kwargs) -> None: + super(IotHubNameAvailabilityInfo, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = message + + +class IotHubProperties(Model): + """The properties of an IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param authorization_policies: The shared access policies you can use to + secure a connection to the IoT hub. + :type authorization_policies: + list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] + :param ip_filter_rules: The IP filter rules. + :type ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule] + :ivar provisioning_state: The provisioning state. + :vartype provisioning_state: str + :ivar state: The hub state. + :vartype state: str + :ivar host_name: The name of the host. + :vartype host_name: str + :param event_hub_endpoints: The Event Hub-compatible endpoint properties. + The only possible keys to this dictionary is events. This key has to be + present in the dictionary while making create or update calls for the IoT + hub. + :type event_hub_endpoints: dict[str, + ~azure.mgmt.iothub.models.EventHubProperties] + :param routing: + :type routing: ~azure.mgmt.iothub.models.RoutingProperties + :param storage_endpoints: The list of Azure Storage endpoints where you + can upload files. Currently you can configure only one Azure Storage + account and that MUST have its key as $default. Specifying more than one + storage account causes an error to be thrown. Not specifying a value for + this property when the enableFileUploadNotifications property is set to + True, causes an error to be thrown. + :type storage_endpoints: dict[str, + ~azure.mgmt.iothub.models.StorageEndpointProperties] + :param messaging_endpoints: The messaging endpoint properties for the file + upload notification queue. + :type messaging_endpoints: dict[str, + ~azure.mgmt.iothub.models.MessagingEndpointProperties] + :param enable_file_upload_notifications: If True, file upload + notifications are enabled. + :type enable_file_upload_notifications: bool + :param cloud_to_device: + :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties + :param comments: IoT hub comments. + :type comments: str + :param device_streams: The device streams properties of iothub. + :type device_streams: + ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams + :param features: The capabilities and features enabled for the IoT hub. + Possible values include: 'None', 'DeviceManagement' + :type features: str or ~azure.mgmt.iothub.models.Capabilities + :ivar locations: Primary and secondary location for iot hub + :vartype locations: + list[~azure.mgmt.iothub.models.IotHubLocationDescription] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'state': {'readonly': True}, + 'host_name': {'readonly': True}, + 'locations': {'readonly': True}, + } + + _attribute_map = { + 'authorization_policies': {'key': 'authorizationPolicies', 'type': '[SharedAccessSignatureAuthorizationRule]'}, + 'ip_filter_rules': {'key': 'ipFilterRules', 'type': '[IpFilterRule]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'event_hub_endpoints': {'key': 'eventHubEndpoints', 'type': '{EventHubProperties}'}, + 'routing': {'key': 'routing', 'type': 'RoutingProperties'}, + 'storage_endpoints': {'key': 'storageEndpoints', 'type': '{StorageEndpointProperties}'}, + 'messaging_endpoints': {'key': 'messagingEndpoints', 'type': '{MessagingEndpointProperties}'}, + 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, + 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, + 'features': {'key': 'features', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[IotHubLocationDescription]'}, + } + + def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications: bool=None, cloud_to_device=None, comments: str=None, device_streams=None, features=None, **kwargs) -> None: + super(IotHubProperties, self).__init__(**kwargs) + self.authorization_policies = authorization_policies + self.ip_filter_rules = ip_filter_rules + self.provisioning_state = None + self.state = None + self.host_name = None + self.event_hub_endpoints = event_hub_endpoints + self.routing = routing + self.storage_endpoints = storage_endpoints + self.messaging_endpoints = messaging_endpoints + self.enable_file_upload_notifications = enable_file_upload_notifications + self.cloud_to_device = cloud_to_device + self.comments = comments + self.device_streams = device_streams + self.features = features + self.locations = None + + +class IotHubPropertiesDeviceStreams(Model): + """The device streams properties of iothub. + + :param streaming_endpoints: List of Device Streams Endpoints. + :type streaming_endpoints: list[str] + """ + + _attribute_map = { + 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, + } + + def __init__(self, *, streaming_endpoints=None, **kwargs) -> None: + super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) + self.streaming_endpoints = streaming_endpoints + + +class IotHubQuotaMetricInfo(Model): + """Quota metrics properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the quota metric. + :vartype name: str + :ivar current_value: The current value for the quota metric. + :vartype current_value: long + :ivar max_value: The maximum value of the quota metric. + :vartype max_value: long + """ + + _validation = { + 'name': {'readonly': True}, + 'current_value': {'readonly': True}, + 'max_value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'max_value': {'key': 'maxValue', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(IotHubQuotaMetricInfo, self).__init__(**kwargs) + self.name = None + self.current_value = None + self.max_value = None + + +class IotHubSkuDescription(Model): + """SKU properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :param sku: Required. The type of the resource. + :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo + :param capacity: Required. IotHub capacity + :type capacity: ~azure.mgmt.iothub.models.IotHubCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'required': True}, + 'capacity': {'required': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, + 'capacity': {'key': 'capacity', 'type': 'IotHubCapacity'}, + } + + def __init__(self, *, sku, capacity, **kwargs) -> None: + super(IotHubSkuDescription, self).__init__(**kwargs) + self.resource_type = None + self.sku = sku + self.capacity = capacity + + +class IotHubSkuInfo(Model): + """Information about the SKU of the IoT hub. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Possible values include: 'F1', + 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' + :type name: str or ~azure.mgmt.iothub.models.IotHubSku + :ivar tier: The billing tier for the IoT hub. Possible values include: + 'Free', 'Standard', 'Basic' + :vartype tier: str or ~azure.mgmt.iothub.models.IotHubSkuTier + :param capacity: The number of provisioned IoT Hub units. See: + https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. + :type capacity: long + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'IotHubSkuTier'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name, capacity: int=None, **kwargs) -> None: + super(IotHubSkuInfo, self).__init__(**kwargs) + self.name = name + self.tier = None + self.capacity = capacity + + +class IpFilterRule(Model): + """The IP filter rules for the IoT hub. + + All required parameters must be populated in order to send to Azure. + + :param filter_name: Required. The name of the IP filter rule. + :type filter_name: str + :param action: Required. The desired action for requests captured by this + rule. Possible values include: 'Accept', 'Reject' + :type action: str or ~azure.mgmt.iothub.models.IpFilterActionType + :param ip_mask: Required. A string that contains the IP address range in + CIDR notation for the rule. + :type ip_mask: str + """ + + _validation = { + 'filter_name': {'required': True}, + 'action': {'required': True}, + 'ip_mask': {'required': True}, + } + + _attribute_map = { + 'filter_name': {'key': 'filterName', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'IpFilterActionType'}, + 'ip_mask': {'key': 'ipMask', 'type': 'str'}, + } + + def __init__(self, *, filter_name: str, action, ip_mask: str, **kwargs) -> None: + super(IpFilterRule, self).__init__(**kwargs) + self.filter_name = filter_name + self.action = action + self.ip_mask = ip_mask + + +class JobResponse(Model): + """The properties of the Job Response object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar job_id: The job identifier. + :vartype job_id: str + :ivar start_time_utc: The start time of the job. + :vartype start_time_utc: datetime + :ivar end_time_utc: The time the job stopped processing. + :vartype end_time_utc: datetime + :ivar type: The type of the job. Possible values include: 'unknown', + 'export', 'import', 'backup', 'readDeviceProperties', + 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', + 'factoryResetDevice', 'firmwareUpdate' + :vartype type: str or ~azure.mgmt.iothub.models.JobType + :ivar status: The status of the job. Possible values include: 'unknown', + 'enqueued', 'running', 'completed', 'failed', 'cancelled' + :vartype status: str or ~azure.mgmt.iothub.models.JobStatus + :ivar failure_reason: If status == failed, this string containing the + reason for the failure. + :vartype failure_reason: str + :ivar status_message: The status message for the job. + :vartype status_message: str + :ivar parent_job_id: The job identifier of the parent job, if any. + :vartype parent_job_id: str + """ + + _validation = { + 'job_id': {'readonly': True}, + 'start_time_utc': {'readonly': True}, + 'end_time_utc': {'readonly': True}, + 'type': {'readonly': True}, + 'status': {'readonly': True}, + 'failure_reason': {'readonly': True}, + 'status_message': {'readonly': True}, + 'parent_job_id': {'readonly': True}, + } + + _attribute_map = { + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'rfc-1123'}, + 'end_time_utc': {'key': 'endTimeUtc', 'type': 'rfc-1123'}, + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'JobStatus'}, + 'failure_reason': {'key': 'failureReason', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'parent_job_id': {'key': 'parentJobId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(JobResponse, self).__init__(**kwargs) + self.job_id = None + self.start_time_utc = None + self.end_time_utc = None + self.type = None + self.status = None + self.failure_reason = None + self.status_message = None + self.parent_job_id = None + + +class MatchedRoute(Model): + """Routes that matched. + + :param properties: Properties of routes that matched + :type properties: ~azure.mgmt.iothub.models.RouteProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'RouteProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(MatchedRoute, self).__init__(**kwargs) + self.properties = properties + + +class MessagingEndpointProperties(Model): + """The properties of the messaging endpoints used by this IoT hub. + + :param lock_duration_as_iso8601: The lock duration. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + :type lock_duration_as_iso8601: timedelta + :param ttl_as_iso8601: The period of time for which a message is available + to consume before it is expired by the IoT hub. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + :type ttl_as_iso8601: timedelta + :param max_delivery_count: The number of times the IoT hub attempts to + deliver a message. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. + :type max_delivery_count: int + """ + + _validation = { + 'max_delivery_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, + 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, + 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, + } + + def __init__(self, *, lock_duration_as_iso8601=None, ttl_as_iso8601=None, max_delivery_count: int=None, **kwargs) -> None: + super(MessagingEndpointProperties, self).__init__(**kwargs) + self.lock_duration_as_iso8601 = lock_duration_as_iso8601 + self.ttl_as_iso8601 = ttl_as_iso8601 + self.max_delivery_count = max_delivery_count + + +class Name(Model): + """Name of Iot Hub type. + + :param value: IotHub type + :type value: str + :param localized_value: Localized value of name + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(Name, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class Operation(Model): + """IoT Hub REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{read | write | action | + delete} + :vartype name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.iothub.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft Devices + :vartype provider: str + :ivar resource: Resource Type: IotHubs + :vartype resource: str + :ivar operation: Name of the operation + :vartype operation: str + :ivar description: Description of the operation + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationInputs(Model): + """Input values. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the IoT hub to check. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, **kwargs) -> None: + super(OperationInputs, self).__init__(**kwargs) + self.name = name + + +class RegistryStatistics(Model): + """Identity registry statistics. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar total_device_count: The total count of devices in the identity + registry. + :vartype total_device_count: long + :ivar enabled_device_count: The count of enabled devices in the identity + registry. + :vartype enabled_device_count: long + :ivar disabled_device_count: The count of disabled devices in the identity + registry. + :vartype disabled_device_count: long + """ + + _validation = { + 'total_device_count': {'readonly': True}, + 'enabled_device_count': {'readonly': True}, + 'disabled_device_count': {'readonly': True}, + } + + _attribute_map = { + 'total_device_count': {'key': 'totalDeviceCount', 'type': 'long'}, + 'enabled_device_count': {'key': 'enabledDeviceCount', 'type': 'long'}, + 'disabled_device_count': {'key': 'disabledDeviceCount', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(RegistryStatistics, self).__init__(**kwargs) + self.total_device_count = None + self.enabled_device_count = None + self.disabled_device_count = None + + +class RouteCompilationError(Model): + """Compilation error when evaluating route. + + :param message: Route error message + :type message: str + :param severity: Severity of the route error. Possible values include: + 'error', 'warning' + :type severity: str or ~azure.mgmt.iothub.models.RouteErrorSeverity + :param location: Location where the route error happened + :type location: ~azure.mgmt.iothub.models.RouteErrorRange + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'RouteErrorRange'}, + } + + def __init__(self, *, message: str=None, severity=None, location=None, **kwargs) -> None: + super(RouteCompilationError, self).__init__(**kwargs) + self.message = message + self.severity = severity + self.location = location + + +class RouteErrorPosition(Model): + """Position where the route error happened. + + :param line: Line where the route error happened + :type line: int + :param column: Column where the route error happened + :type column: int + """ + + _attribute_map = { + 'line': {'key': 'line', 'type': 'int'}, + 'column': {'key': 'column', 'type': 'int'}, + } + + def __init__(self, *, line: int=None, column: int=None, **kwargs) -> None: + super(RouteErrorPosition, self).__init__(**kwargs) + self.line = line + self.column = column + + +class RouteErrorRange(Model): + """Range of route errors. + + :param start: Start where the route error happened + :type start: ~azure.mgmt.iothub.models.RouteErrorPosition + :param end: End where the route error happened + :type end: ~azure.mgmt.iothub.models.RouteErrorPosition + """ + + _attribute_map = { + 'start': {'key': 'start', 'type': 'RouteErrorPosition'}, + 'end': {'key': 'end', 'type': 'RouteErrorPosition'}, + } + + def __init__(self, *, start=None, end=None, **kwargs) -> None: + super(RouteErrorRange, self).__init__(**kwargs) + self.start = start + self.end = end + + +class RouteProperties(Model): + """The properties of a routing rule that your IoT hub uses to route messages + to endpoints. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the route. The name can only include + alphanumeric characters, periods, underscores, hyphens, has a maximum + length of 64 characters, and must be unique. + :type name: str + :param source: Required. The source that the routing rule is to be applied + to, such as DeviceMessages. Possible values include: 'Invalid', + 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', + 'DeviceJobLifecycleEvents' + :type source: str or ~azure.mgmt.iothub.models.RoutingSource + :param condition: The condition that is evaluated to apply the routing + rule. If no condition is provided, it evaluates to true by default. For + grammar, see: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language + :type condition: str + :param endpoint_names: Required. The list of endpoints to which messages + that satisfy the condition are routed. Currently only one endpoint is + allowed. + :type endpoint_names: list[str] + :param is_enabled: Required. Used to specify whether a route is enabled. + :type is_enabled: bool + """ + + _validation = { + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + 'source': {'required': True}, + 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'condition': {'key': 'condition', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, name: str, source, endpoint_names, is_enabled: bool, condition: str=None, **kwargs) -> None: + super(RouteProperties, self).__init__(**kwargs) + self.name = name + self.source = source + self.condition = condition + self.endpoint_names = endpoint_names + self.is_enabled = is_enabled + + +class RoutingEndpoints(Model): + """The properties related to the custom endpoints to which your IoT hub routes + messages based on the routing rules. A maximum of 10 custom endpoints are + allowed across all endpoint types for paid hubs and only 1 custom endpoint + is allowed across all endpoint types for free hubs. + + :param service_bus_queues: The list of Service Bus queue endpoints that + IoT hub routes the messages to, based on the routing rules. + :type service_bus_queues: + list[~azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties] + :param service_bus_topics: The list of Service Bus topic endpoints that + the IoT hub routes the messages to, based on the routing rules. + :type service_bus_topics: + list[~azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties] + :param event_hubs: The list of Event Hubs endpoints that IoT hub routes + messages to, based on the routing rules. This list does not include the + built-in Event Hubs endpoint. + :type event_hubs: + list[~azure.mgmt.iothub.models.RoutingEventHubProperties] + :param storage_containers: The list of storage container endpoints that + IoT hub routes messages to, based on the routing rules. + :type storage_containers: + list[~azure.mgmt.iothub.models.RoutingStorageContainerProperties] + """ + + _attribute_map = { + 'service_bus_queues': {'key': 'serviceBusQueues', 'type': '[RoutingServiceBusQueueEndpointProperties]'}, + 'service_bus_topics': {'key': 'serviceBusTopics', 'type': '[RoutingServiceBusTopicEndpointProperties]'}, + 'event_hubs': {'key': 'eventHubs', 'type': '[RoutingEventHubProperties]'}, + 'storage_containers': {'key': 'storageContainers', 'type': '[RoutingStorageContainerProperties]'}, + } + + def __init__(self, *, service_bus_queues=None, service_bus_topics=None, event_hubs=None, storage_containers=None, **kwargs) -> None: + super(RoutingEndpoints, self).__init__(**kwargs) + self.service_bus_queues = service_bus_queues + self.service_bus_topics = service_bus_topics + self.event_hubs = event_hubs + self.storage_containers = storage_containers + + +class RoutingEventHubProperties(Model): + """The properties related to an event hub endpoint. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the event hub + endpoint. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. + :type name: str + :param subscription_id: The subscription identifier of the event hub + endpoint. + :type subscription_id: str + :param resource_group: The name of the resource group of the event hub + endpoint. + :type resource_group: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, name: str, subscription_id: str=None, resource_group: str=None, **kwargs) -> None: + super(RoutingEventHubProperties, self).__init__(**kwargs) + self.connection_string = connection_string + self.name = name + self.subscription_id = subscription_id + self.resource_group = resource_group + + +class RoutingMessage(Model): + """Routing message. + + :param body: Body of routing message + :type body: str + :param app_properties: App properties + :type app_properties: dict[str, str] + :param system_properties: System properties + :type system_properties: dict[str, str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'str'}, + 'app_properties': {'key': 'appProperties', 'type': '{str}'}, + 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, + } + + def __init__(self, *, body: str=None, app_properties=None, system_properties=None, **kwargs) -> None: + super(RoutingMessage, self).__init__(**kwargs) + self.body = body + self.app_properties = app_properties + self.system_properties = system_properties + + +class RoutingProperties(Model): + """The routing related properties of the IoT hub. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging. + + :param endpoints: + :type endpoints: ~azure.mgmt.iothub.models.RoutingEndpoints + :param routes: The list of user-provided routing rules that the IoT hub + uses to route messages to built-in and custom endpoints. A maximum of 100 + routing rules are allowed for paid hubs and a maximum of 5 routing rules + are allowed for free hubs. + :type routes: list[~azure.mgmt.iothub.models.RouteProperties] + :param fallback_route: The properties of the route that is used as a + fall-back route when none of the conditions specified in the 'routes' + section are met. This is an optional parameter. When this property is not + set, the messages which do not meet any of the conditions specified in the + 'routes' section get routed to the built-in eventhub endpoint. + :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties + :param enrichments: The list of user-provided enrichments that the IoT hub + applies to messages to be delivered to built-in and custom endpoints. See: + https://aka.ms/iotmsgenrich + :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] + """ + + _attribute_map = { + 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, + 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, + 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, + 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, + } + + def __init__(self, *, endpoints=None, routes=None, fallback_route=None, enrichments=None, **kwargs) -> None: + super(RoutingProperties, self).__init__(**kwargs) + self.endpoints = endpoints + self.routes = routes + self.fallback_route = fallback_route + self.enrichments = enrichments + + +class RoutingServiceBusQueueEndpointProperties(Model): + """The properties related to service bus queue endpoint types. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the service + bus queue endpoint. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. The name need not be the same as the actual + queue name. + :type name: str + :param subscription_id: The subscription identifier of the service bus + queue endpoint. + :type subscription_id: str + :param resource_group: The name of the resource group of the service bus + queue endpoint. + :type resource_group: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, name: str, subscription_id: str=None, resource_group: str=None, **kwargs) -> None: + super(RoutingServiceBusQueueEndpointProperties, self).__init__(**kwargs) + self.connection_string = connection_string + self.name = name + self.subscription_id = subscription_id + self.resource_group = resource_group + + +class RoutingServiceBusTopicEndpointProperties(Model): + """The properties related to service bus topic endpoint types. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the service + bus topic endpoint. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. The name need not be the same as the actual + topic name. + :type name: str + :param subscription_id: The subscription identifier of the service bus + topic endpoint. + :type subscription_id: str + :param resource_group: The name of the resource group of the service bus + topic endpoint. + :type resource_group: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, name: str, subscription_id: str=None, resource_group: str=None, **kwargs) -> None: + super(RoutingServiceBusTopicEndpointProperties, self).__init__(**kwargs) + self.connection_string = connection_string + self.name = name + self.subscription_id = subscription_id + self.resource_group = resource_group + + +class RoutingStorageContainerProperties(Model): + """The properties related to a storage container endpoint. + + All required parameters must be populated in order to send to Azure. + + :param connection_string: Required. The connection string of the storage + account. + :type connection_string: str + :param name: Required. The name that identifies this endpoint. The name + can only include alphanumeric characters, periods, underscores, hyphens + and has a maximum length of 64 characters. The following names are + reserved: events, fileNotifications, $default. Endpoint names must be + unique across endpoint types. + :type name: str + :param subscription_id: The subscription identifier of the storage + account. + :type subscription_id: str + :param resource_group: The name of the resource group of the storage + account. + :type resource_group: str + :param container_name: Required. The name of storage container in the + storage account. + :type container_name: str + :param file_name_format: File name format for the blob. Default format is + {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are + mandatory but can be reordered. + :type file_name_format: str + :param batch_frequency_in_seconds: Time interval at which blobs are + written to storage. Value should be between 60 and 720 seconds. Default + value is 300 seconds. + :type batch_frequency_in_seconds: int + :param max_chunk_size_in_bytes: Maximum number of bytes for each blob + written to storage. Value should be between 10485760(10MB) and + 524288000(500MB). Default value is 314572800(300MB). + :type max_chunk_size_in_bytes: int + :param encoding: Encoding that is used to serialize messages to blobs. + Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is + 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON' + :type encoding: str or ~azure.mgmt.iothub.models.enum + """ + + _validation = { + 'connection_string': {'required': True}, + 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, + 'container_name': {'required': True}, + 'batch_frequency_in_seconds': {'maximum': 720, 'minimum': 60}, + 'max_chunk_size_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, + } + + _attribute_map = { + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'file_name_format': {'key': 'fileNameFormat', 'type': 'str'}, + 'batch_frequency_in_seconds': {'key': 'batchFrequencyInSeconds', 'type': 'int'}, + 'max_chunk_size_in_bytes': {'key': 'maxChunkSizeInBytes', 'type': 'int'}, + 'encoding': {'key': 'encoding', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, name: str, container_name: str, subscription_id: str=None, resource_group: str=None, file_name_format: str=None, batch_frequency_in_seconds: int=None, max_chunk_size_in_bytes: int=None, encoding=None, **kwargs) -> None: + super(RoutingStorageContainerProperties, self).__init__(**kwargs) + self.connection_string = connection_string + self.name = name + self.subscription_id = subscription_id + self.resource_group = resource_group + self.container_name = container_name + self.file_name_format = file_name_format + self.batch_frequency_in_seconds = batch_frequency_in_seconds + self.max_chunk_size_in_bytes = max_chunk_size_in_bytes + self.encoding = encoding + + +class RoutingTwin(Model): + """Twin reference input parameter. This is an optional parameter. + + :param tags: Twin Tags + :type tags: object + :param properties: + :type properties: ~azure.mgmt.iothub.models.RoutingTwinProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'RoutingTwinProperties'}, + } + + def __init__(self, *, tags=None, properties=None, **kwargs) -> None: + super(RoutingTwin, self).__init__(**kwargs) + self.tags = tags + self.properties = properties + + +class RoutingTwinProperties(Model): + """RoutingTwinProperties. + + :param desired: Twin desired properties + :type desired: object + :param reported: Twin desired properties + :type reported: object + """ + + _attribute_map = { + 'desired': {'key': 'desired', 'type': 'object'}, + 'reported': {'key': 'reported', 'type': 'object'}, + } + + def __init__(self, *, desired=None, reported=None, **kwargs) -> None: + super(RoutingTwinProperties, self).__init__(**kwargs) + self.desired = desired + self.reported = reported + + +class SharedAccessSignatureAuthorizationRule(Model): + """The properties of an IoT hub shared access policy. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The name of the shared access policy. + :type key_name: str + :param primary_key: The primary key. + :type primary_key: str + :param secondary_key: The secondary key. + :type secondary_key: str + :param rights: Required. The permissions assigned to the shared access + policy. Possible values include: 'RegistryRead', 'RegistryWrite', + 'ServiceConnect', 'DeviceConnect', 'RegistryRead, RegistryWrite', + 'RegistryRead, ServiceConnect', 'RegistryRead, DeviceConnect', + 'RegistryWrite, ServiceConnect', 'RegistryWrite, DeviceConnect', + 'ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, + ServiceConnect', 'RegistryRead, RegistryWrite, DeviceConnect', + 'RegistryRead, ServiceConnect, DeviceConnect', 'RegistryWrite, + ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, + ServiceConnect, DeviceConnect' + :type rights: str or ~azure.mgmt.iothub.models.AccessRights + """ + + _validation = { + 'key_name': {'required': True}, + 'rights': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'rights': {'key': 'rights', 'type': 'AccessRights'}, + } + + def __init__(self, *, key_name: str, rights, primary_key: str=None, secondary_key: str=None, **kwargs) -> None: + super(SharedAccessSignatureAuthorizationRule, self).__init__(**kwargs) + self.key_name = key_name + self.primary_key = primary_key + self.secondary_key = secondary_key + self.rights = rights + + +class StorageEndpointProperties(Model): + """The properties of the Azure Storage endpoint for file upload. + + All required parameters must be populated in order to send to Azure. + + :param sas_ttl_as_iso8601: The period of time for which the SAS URI + generated by IoT Hub for file upload is valid. See: + https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. + :type sas_ttl_as_iso8601: timedelta + :param connection_string: Required. The connection string for the Azure + Storage account to which files are uploaded. + :type connection_string: str + :param container_name: Required. The name of the root container where you + upload files. The container need not exist but should be creatable using + the connectionString specified. + :type container_name: str + """ + + _validation = { + 'connection_string': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'sas_ttl_as_iso8601': {'key': 'sasTtlAsIso8601', 'type': 'duration'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, container_name: str, sas_ttl_as_iso8601=None, **kwargs) -> None: + super(StorageEndpointProperties, self).__init__(**kwargs) + self.sas_ttl_as_iso8601 = sas_ttl_as_iso8601 + self.connection_string = connection_string + self.container_name = container_name + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags on an IoT Hub instance. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(TagsResource, self).__init__(**kwargs) + self.tags = tags + + +class TestAllRoutesInput(Model): + """Input for testing all routes. + + :param routing_source: Routing source. Possible values include: 'Invalid', + 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', + 'DeviceJobLifecycleEvents' + :type routing_source: str or ~azure.mgmt.iothub.models.RoutingSource + :param message: Routing message + :type message: ~azure.mgmt.iothub.models.RoutingMessage + :param twin: Routing Twin Reference + :type twin: ~azure.mgmt.iothub.models.RoutingTwin + """ + + _attribute_map = { + 'routing_source': {'key': 'routingSource', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'RoutingMessage'}, + 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, + } + + def __init__(self, *, routing_source=None, message=None, twin=None, **kwargs) -> None: + super(TestAllRoutesInput, self).__init__(**kwargs) + self.routing_source = routing_source + self.message = message + self.twin = twin + + +class TestAllRoutesResult(Model): + """Result of testing all routes. + + :param routes: JSON-serialized array of matched routes + :type routes: list[~azure.mgmt.iothub.models.MatchedRoute] + """ + + _attribute_map = { + 'routes': {'key': 'routes', 'type': '[MatchedRoute]'}, + } + + def __init__(self, *, routes=None, **kwargs) -> None: + super(TestAllRoutesResult, self).__init__(**kwargs) + self.routes = routes + + +class TestRouteInput(Model): + """Input for testing route. + + All required parameters must be populated in order to send to Azure. + + :param message: Routing message + :type message: ~azure.mgmt.iothub.models.RoutingMessage + :param route: Required. Route properties + :type route: ~azure.mgmt.iothub.models.RouteProperties + :param twin: Routing Twin Reference + :type twin: ~azure.mgmt.iothub.models.RoutingTwin + """ + + _validation = { + 'route': {'required': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'RoutingMessage'}, + 'route': {'key': 'route', 'type': 'RouteProperties'}, + 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, + } + + def __init__(self, *, route, message=None, twin=None, **kwargs) -> None: + super(TestRouteInput, self).__init__(**kwargs) + self.message = message + self.route = route + self.twin = twin + + +class TestRouteResult(Model): + """Result of testing one route. + + :param result: Result of testing route. Possible values include: + 'undefined', 'false', 'true' + :type result: str or ~azure.mgmt.iothub.models.TestResultStatus + :param details: Detailed result of testing route + :type details: ~azure.mgmt.iothub.models.TestRouteResultDetails + """ + + _attribute_map = { + 'result': {'key': 'result', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'TestRouteResultDetails'}, + } + + def __init__(self, *, result=None, details=None, **kwargs) -> None: + super(TestRouteResult, self).__init__(**kwargs) + self.result = result + self.details = details + + +class TestRouteResultDetails(Model): + """Detailed result of testing a route. + + :param compilation_errors: JSON-serialized list of route compilation + errors + :type compilation_errors: + list[~azure.mgmt.iothub.models.RouteCompilationError] + """ + + _attribute_map = { + 'compilation_errors': {'key': 'compilationErrors', 'type': '[RouteCompilationError]'}, + } + + def __init__(self, *, compilation_errors=None, **kwargs) -> None: + super(TestRouteResultDetails, self).__init__(**kwargs) + self.compilation_errors = compilation_errors + + +class UserSubscriptionQuota(Model): + """User subscription quota response. + + :param id: IotHub type id + :type id: str + :param type: Response type + :type type: str + :param unit: Unit of IotHub type + :type unit: str + :param current_value: Current number of IotHub type + :type current_value: int + :param limit: Numerical limit on IotHub type + :type limit: int + :param name: IotHub type + :type name: ~azure.mgmt.iothub.models.Name + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'Name'}, + } + + def __init__(self, *, id: str=None, type: str=None, unit: str=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + super(UserSubscriptionQuota, self).__init__(**kwargs) + self.id = id + self.type = type + self.unit = unit + self.current_value = current_value + self.limit = limit + self.name = name + + +class UserSubscriptionQuotaListResult(Model): + """Json-serialized array of User subscription quota response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param value: + :type value: list[~azure.mgmt.iothub.models.UserSubscriptionQuota] + :ivar next_link: + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UserSubscriptionQuota]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(UserSubscriptionQuotaListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_paged_models.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_paged_models.py new file mode 100644 index 000000000000..9efc5c83f755 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_paged_models.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class IotHubDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`IotHubDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IotHubDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(IotHubDescriptionPaged, self).__init__(*args, **kwargs) +class IotHubSkuDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`IotHubSkuDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IotHubSkuDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(IotHubSkuDescriptionPaged, self).__init__(*args, **kwargs) +class EventHubConsumerGroupInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`EventHubConsumerGroupInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EventHubConsumerGroupInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(EventHubConsumerGroupInfoPaged, self).__init__(*args, **kwargs) +class JobResponsePaged(Paged): + """ + A paging container for iterating over a list of :class:`JobResponse ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[JobResponse]'} + } + + def __init__(self, *args, **kwargs): + + super(JobResponsePaged, self).__init__(*args, **kwargs) +class IotHubQuotaMetricInfoPaged(Paged): + """ + A paging container for iterating over a list of :class:`IotHubQuotaMetricInfo ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IotHubQuotaMetricInfo]'} + } + + def __init__(self, *args, **kwargs): + + super(IotHubQuotaMetricInfoPaged, self).__init__(*args, **kwargs) +class EndpointHealthDataPaged(Paged): + """ + A paging container for iterating over a list of :class:`EndpointHealthData ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[EndpointHealthData]'} + } + + def __init__(self, *args, **kwargs): + + super(EndpointHealthDataPaged, self).__init__(*args, **kwargs) +class SharedAccessSignatureAuthorizationRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`SharedAccessSignatureAuthorizationRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SharedAccessSignatureAuthorizationRule]'} + } + + def __init__(self, *args, **kwargs): + + super(SharedAccessSignatureAuthorizationRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description.py deleted file mode 100644 index 5d5a6544d3dd..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateBodyDescription(Model): - """The JSON-serialized X509 Certificate. - - :param certificate: base-64 representation of the X509 leaf certificate - .cer file or just .pem file content. - :type certificate: str - """ - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateBodyDescription, self).__init__(**kwargs) - self.certificate = kwargs.get('certificate', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description_py3.py deleted file mode 100644 index be4943779261..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_body_description_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateBodyDescription(Model): - """The JSON-serialized X509 Certificate. - - :param certificate: base-64 representation of the X509 leaf certificate - .cer file or just .pem file content. - :type certificate: str - """ - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, *, certificate: str=None, **kwargs) -> None: - super(CertificateBodyDescription, self).__init__(**kwargs) - self.certificate = certificate diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description.py deleted file mode 100644 index 479940e33fd2..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateDescription(Model): - """The X509 Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: - :type properties: ~azure.mgmt.iothub.models.CertificateProperties - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The name of the certificate. - :vartype name: str - :ivar etag: The entity tag. - :vartype etag: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateDescription, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.id = None - self.name = None - self.etag = None - self.type = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description_py3.py deleted file mode 100644 index 2c96f61a5857..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_description_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateDescription(Model): - """The X509 Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: - :type properties: ~azure.mgmt.iothub.models.CertificateProperties - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The name of the certificate. - :vartype name: str - :ivar etag: The entity tag. - :vartype etag: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(CertificateDescription, self).__init__(**kwargs) - self.properties = properties - self.id = None - self.name = None - self.etag = None - self.type = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description.py deleted file mode 100644 index c52bf8439ba9..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateListDescription(Model): - """The JSON-serialized array of Certificate objects. - - :param value: The array of Certificate objects. - :type value: list[~azure.mgmt.iothub.models.CertificateDescription] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CertificateDescription]'}, - } - - def __init__(self, **kwargs): - super(CertificateListDescription, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description_py3.py deleted file mode 100644 index 9047516be862..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_list_description_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateListDescription(Model): - """The JSON-serialized array of Certificate objects. - - :param value: The array of Certificate objects. - :type value: list[~azure.mgmt.iothub.models.CertificateDescription] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CertificateDescription]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(CertificateListDescription, self).__init__(**kwargs) - self.value = value diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties.py deleted file mode 100644 index eaf2548f0f76..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateProperties(Model): - """The description of an X509 CA Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subject: The certificate's subject name. - :vartype subject: str - :ivar expiry: The certificate's expiration date and time. - :vartype expiry: datetime - :ivar thumbprint: The certificate's thumbprint. - :vartype thumbprint: str - :ivar is_verified: Determines whether certificate has been verified. - :vartype is_verified: bool - :ivar created: The certificate's create date and time. - :vartype created: datetime - :ivar updated: The certificate's last update date and time. - :vartype updated: datetime - :param certificate: The certificate content - :type certificate: str - """ - - _validation = { - 'subject': {'readonly': True}, - 'expiry': {'readonly': True}, - 'thumbprint': {'readonly': True}, - 'is_verified': {'readonly': True}, - 'created': {'readonly': True}, - 'updated': {'readonly': True}, - } - - _attribute_map = { - 'subject': {'key': 'subject', 'type': 'str'}, - 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'is_verified': {'key': 'isVerified', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'rfc-1123'}, - 'updated': {'key': 'updated', 'type': 'rfc-1123'}, - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateProperties, self).__init__(**kwargs) - self.subject = None - self.expiry = None - self.thumbprint = None - self.is_verified = None - self.created = None - self.updated = None - self.certificate = kwargs.get('certificate', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_py3.py deleted file mode 100644 index d9ac812152ce..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateProperties(Model): - """The description of an X509 CA Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subject: The certificate's subject name. - :vartype subject: str - :ivar expiry: The certificate's expiration date and time. - :vartype expiry: datetime - :ivar thumbprint: The certificate's thumbprint. - :vartype thumbprint: str - :ivar is_verified: Determines whether certificate has been verified. - :vartype is_verified: bool - :ivar created: The certificate's create date and time. - :vartype created: datetime - :ivar updated: The certificate's last update date and time. - :vartype updated: datetime - :param certificate: The certificate content - :type certificate: str - """ - - _validation = { - 'subject': {'readonly': True}, - 'expiry': {'readonly': True}, - 'thumbprint': {'readonly': True}, - 'is_verified': {'readonly': True}, - 'created': {'readonly': True}, - 'updated': {'readonly': True}, - } - - _attribute_map = { - 'subject': {'key': 'subject', 'type': 'str'}, - 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'is_verified': {'key': 'isVerified', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'rfc-1123'}, - 'updated': {'key': 'updated', 'type': 'rfc-1123'}, - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, *, certificate: str=None, **kwargs) -> None: - super(CertificateProperties, self).__init__(**kwargs) - self.subject = None - self.expiry = None - self.thumbprint = None - self.is_verified = None - self.created = None - self.updated = None - self.certificate = certificate diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce.py deleted file mode 100644 index b5c2e7eb3a5f..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificatePropertiesWithNonce(Model): - """The description of an X509 CA Certificate including the challenge nonce - issued for the Proof-Of-Possession flow. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subject: The certificate's subject name. - :vartype subject: str - :ivar expiry: The certificate's expiration date and time. - :vartype expiry: datetime - :ivar thumbprint: The certificate's thumbprint. - :vartype thumbprint: str - :ivar is_verified: Determines whether certificate has been verified. - :vartype is_verified: bool - :ivar created: The certificate's create date and time. - :vartype created: datetime - :ivar updated: The certificate's last update date and time. - :vartype updated: datetime - :ivar verification_code: The certificate's verification code that will be - used for proof of possession. - :vartype verification_code: str - :ivar certificate: The certificate content - :vartype certificate: str - """ - - _validation = { - 'subject': {'readonly': True}, - 'expiry': {'readonly': True}, - 'thumbprint': {'readonly': True}, - 'is_verified': {'readonly': True}, - 'created': {'readonly': True}, - 'updated': {'readonly': True}, - 'verification_code': {'readonly': True}, - 'certificate': {'readonly': True}, - } - - _attribute_map = { - 'subject': {'key': 'subject', 'type': 'str'}, - 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'is_verified': {'key': 'isVerified', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'rfc-1123'}, - 'updated': {'key': 'updated', 'type': 'rfc-1123'}, - 'verification_code': {'key': 'verificationCode', 'type': 'str'}, - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificatePropertiesWithNonce, self).__init__(**kwargs) - self.subject = None - self.expiry = None - self.thumbprint = None - self.is_verified = None - self.created = None - self.updated = None - self.verification_code = None - self.certificate = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce_py3.py deleted file mode 100644 index 019bbed44de5..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_properties_with_nonce_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificatePropertiesWithNonce(Model): - """The description of an X509 CA Certificate including the challenge nonce - issued for the Proof-Of-Possession flow. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subject: The certificate's subject name. - :vartype subject: str - :ivar expiry: The certificate's expiration date and time. - :vartype expiry: datetime - :ivar thumbprint: The certificate's thumbprint. - :vartype thumbprint: str - :ivar is_verified: Determines whether certificate has been verified. - :vartype is_verified: bool - :ivar created: The certificate's create date and time. - :vartype created: datetime - :ivar updated: The certificate's last update date and time. - :vartype updated: datetime - :ivar verification_code: The certificate's verification code that will be - used for proof of possession. - :vartype verification_code: str - :ivar certificate: The certificate content - :vartype certificate: str - """ - - _validation = { - 'subject': {'readonly': True}, - 'expiry': {'readonly': True}, - 'thumbprint': {'readonly': True}, - 'is_verified': {'readonly': True}, - 'created': {'readonly': True}, - 'updated': {'readonly': True}, - 'verification_code': {'readonly': True}, - 'certificate': {'readonly': True}, - } - - _attribute_map = { - 'subject': {'key': 'subject', 'type': 'str'}, - 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'is_verified': {'key': 'isVerified', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'rfc-1123'}, - 'updated': {'key': 'updated', 'type': 'rfc-1123'}, - 'verification_code': {'key': 'verificationCode', 'type': 'str'}, - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(CertificatePropertiesWithNonce, self).__init__(**kwargs) - self.subject = None - self.expiry = None - self.thumbprint = None - self.is_verified = None - self.created = None - self.updated = None - self.verification_code = None - self.certificate = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description.py deleted file mode 100644 index 58611d8cf66d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateVerificationDescription(Model): - """The JSON-serialized leaf certificate. - - :param certificate: base-64 representation of X509 certificate .cer file - or just .pem file content. - :type certificate: str - """ - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateVerificationDescription, self).__init__(**kwargs) - self.certificate = kwargs.get('certificate', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description_py3.py deleted file mode 100644 index 7d243745f243..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_verification_description_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateVerificationDescription(Model): - """The JSON-serialized leaf certificate. - - :param certificate: base-64 representation of X509 certificate .cer file - or just .pem file content. - :type certificate: str - """ - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, *, certificate: str=None, **kwargs) -> None: - super(CertificateVerificationDescription, self).__init__(**kwargs) - self.certificate = certificate diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description.py deleted file mode 100644 index 67ccd1c69340..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateWithNonceDescription(Model): - """The X509 Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: - :type properties: ~azure.mgmt.iothub.models.CertificatePropertiesWithNonce - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The name of the certificate. - :vartype name: str - :ivar etag: The entity tag. - :vartype etag: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CertificatePropertiesWithNonce'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateWithNonceDescription, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.id = None - self.name = None - self.etag = None - self.type = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description_py3.py deleted file mode 100644 index aeec07b9c021..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/certificate_with_nonce_description_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CertificateWithNonceDescription(Model): - """The X509 Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: - :type properties: ~azure.mgmt.iothub.models.CertificatePropertiesWithNonce - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The name of the certificate. - :vartype name: str - :ivar etag: The entity tag. - :vartype etag: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CertificatePropertiesWithNonce'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(CertificateWithNonceDescription, self).__init__(**kwargs) - self.properties = properties - self.id = None - self.name = None - self.etag = None - self.type = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties.py deleted file mode 100644 index 9b2600c2cd7f..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CloudToDeviceProperties(Model): - """The IoT hub cloud-to-device messaging properties. - - :param max_delivery_count: The max delivery count for cloud-to-device - messages in the device queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type max_delivery_count: int - :param default_ttl_as_iso8601: The default time to live for - cloud-to-device messages in the device queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type default_ttl_as_iso8601: timedelta - :param feedback: - :type feedback: ~azure.mgmt.iothub.models.FeedbackProperties - """ - - _validation = { - 'max_delivery_count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, - 'default_ttl_as_iso8601': {'key': 'defaultTtlAsIso8601', 'type': 'duration'}, - 'feedback': {'key': 'feedback', 'type': 'FeedbackProperties'}, - } - - def __init__(self, **kwargs): - super(CloudToDeviceProperties, self).__init__(**kwargs) - self.max_delivery_count = kwargs.get('max_delivery_count', None) - self.default_ttl_as_iso8601 = kwargs.get('default_ttl_as_iso8601', None) - self.feedback = kwargs.get('feedback', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties_py3.py deleted file mode 100644 index 60ee732c9492..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/cloud_to_device_properties_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class CloudToDeviceProperties(Model): - """The IoT hub cloud-to-device messaging properties. - - :param max_delivery_count: The max delivery count for cloud-to-device - messages in the device queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type max_delivery_count: int - :param default_ttl_as_iso8601: The default time to live for - cloud-to-device messages in the device queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type default_ttl_as_iso8601: timedelta - :param feedback: - :type feedback: ~azure.mgmt.iothub.models.FeedbackProperties - """ - - _validation = { - 'max_delivery_count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, - 'default_ttl_as_iso8601': {'key': 'defaultTtlAsIso8601', 'type': 'duration'}, - 'feedback': {'key': 'feedback', 'type': 'FeedbackProperties'}, - } - - def __init__(self, *, max_delivery_count: int=None, default_ttl_as_iso8601=None, feedback=None, **kwargs) -> None: - super(CloudToDeviceProperties, self).__init__(**kwargs) - self.max_delivery_count = max_delivery_count - self.default_ttl_as_iso8601 = default_ttl_as_iso8601 - self.feedback = feedback diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data.py deleted file mode 100644 index 835a14982b81..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EndpointHealthData(Model): - """The health data for an endpoint. - - :param endpoint_id: Id of the endpoint - :type endpoint_id: str - :param health_status: Health statuses have following meanings. The - 'healthy' status shows that the endpoint is accepting messages as - expected. The 'unhealthy' status shows that the endpoint is not accepting - messages as expected and IoT Hub is retrying to send data to this - endpoint. The status of an unhealthy endpoint will be updated to healthy - when IoT Hub has established an eventually consistent state of health. The - 'dead' status shows that the endpoint is not accepting messages, after IoT - Hub retried sending messages for the retrial period. See IoT Hub metrics - to identify errors and monitor issues with endpoints. The 'unknown' status - shows that the IoT Hub has not established a connection with the endpoint. - No messages have been delivered to or rejected from this endpoint. - Possible values include: 'unknown', 'healthy', 'unhealthy', 'dead' - :type health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus - """ - - _attribute_map = { - 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EndpointHealthData, self).__init__(**kwargs) - self.endpoint_id = kwargs.get('endpoint_id', None) - self.health_status = kwargs.get('health_status', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_paged.py deleted file mode 100644 index 7f46f9c3517d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class EndpointHealthDataPaged(Paged): - """ - A paging container for iterating over a list of :class:`EndpointHealthData ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[EndpointHealthData]'} - } - - def __init__(self, *args, **kwargs): - - super(EndpointHealthDataPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_py3.py deleted file mode 100644 index 1c98d7ca9e3c..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/endpoint_health_data_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EndpointHealthData(Model): - """The health data for an endpoint. - - :param endpoint_id: Id of the endpoint - :type endpoint_id: str - :param health_status: Health statuses have following meanings. The - 'healthy' status shows that the endpoint is accepting messages as - expected. The 'unhealthy' status shows that the endpoint is not accepting - messages as expected and IoT Hub is retrying to send data to this - endpoint. The status of an unhealthy endpoint will be updated to healthy - when IoT Hub has established an eventually consistent state of health. The - 'dead' status shows that the endpoint is not accepting messages, after IoT - Hub retried sending messages for the retrial period. See IoT Hub metrics - to identify errors and monitor issues with endpoints. The 'unknown' status - shows that the IoT Hub has not established a connection with the endpoint. - No messages have been delivered to or rejected from this endpoint. - Possible values include: 'unknown', 'healthy', 'unhealthy', 'dead' - :type health_status: str or ~azure.mgmt.iothub.models.EndpointHealthStatus - """ - - _attribute_map = { - 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, - 'health_status': {'key': 'healthStatus', 'type': 'str'}, - } - - def __init__(self, *, endpoint_id: str=None, health_status=None, **kwargs) -> None: - super(EndpointHealthData, self).__init__(**kwargs) - self.endpoint_id = endpoint_id - self.health_status = health_status diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties.py deleted file mode 100644 index 113f005e19f2..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnrichmentProperties(Model): - """The properties of an enrichment that your IoT hub applies to messages - delivered to endpoints. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key or name for the enrichment property. - :type key: str - :param value: Required. The value for the enrichment property. - :type value: str - :param endpoint_names: Required. The list of endpoints for which the - enrichment is applied to the message. - :type endpoint_names: list[str] - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - 'endpoint_names': {'required': True, 'min_items': 1}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(EnrichmentProperties, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - self.endpoint_names = kwargs.get('endpoint_names', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties_py3.py deleted file mode 100644 index 6a03f19fb6f8..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/enrichment_properties_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EnrichmentProperties(Model): - """The properties of an enrichment that your IoT hub applies to messages - delivered to endpoints. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key or name for the enrichment property. - :type key: str - :param value: Required. The value for the enrichment property. - :type value: str - :param endpoint_names: Required. The list of endpoints for which the - enrichment is applied to the message. - :type endpoint_names: list[str] - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - 'endpoint_names': {'required': True, 'min_items': 1}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - } - - def __init__(self, *, key: str, value: str, endpoint_names, **kwargs) -> None: - super(EnrichmentProperties, self).__init__(**kwargs) - self.key = key - self.value = value - self.endpoint_names = endpoint_names diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details.py deleted file mode 100644 index 77a408028562..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorDetails(Model): - """Error details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar http_status_code: The HTTP status code. - :vartype http_status_code: str - :ivar message: The error message. - :vartype message: str - :ivar details: The error details. - :vartype details: str - """ - - _validation = { - 'code': {'readonly': True}, - 'http_status_code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'http_status_code': {'key': 'httpStatusCode', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.http_status_code = None - self.message = None - self.details = None - - -class ErrorDetailsException(HttpOperationError): - """Server responsed with exception of type: 'ErrorDetails'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details_py3.py deleted file mode 100644 index a78684fab905..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/error_details_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorDetails(Model): - """Error details. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar http_status_code: The HTTP status code. - :vartype http_status_code: str - :ivar message: The error message. - :vartype message: str - :ivar details: The error details. - :vartype details: str - """ - - _validation = { - 'code': {'readonly': True}, - 'http_status_code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'http_status_code': {'key': 'httpStatusCode', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.http_status_code = None - self.message = None - self.details = None - - -class ErrorDetailsException(HttpOperationError): - """Server responsed with exception of type: 'ErrorDetails'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info.py deleted file mode 100644 index b290422ca982..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventHubConsumerGroupInfo(Model): - """The properties of the EventHubConsumerGroupInfo object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: The tags. - :type properties: dict[str, str] - :ivar id: The Event Hub-compatible consumer group identifier. - :vartype id: str - :ivar name: The Event Hub-compatible consumer group name. - :vartype name: str - :ivar type: the resource type. - :vartype type: str - :ivar etag: The etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': '{str}'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventHubConsumerGroupInfo, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.id = None - self.name = None - self.type = None - self.etag = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_paged.py deleted file mode 100644 index 260e39bc3032..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class EventHubConsumerGroupInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`EventHubConsumerGroupInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[EventHubConsumerGroupInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(EventHubConsumerGroupInfoPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_py3.py deleted file mode 100644 index c4ee4c17d78d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_consumer_group_info_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventHubConsumerGroupInfo(Model): - """The properties of the EventHubConsumerGroupInfo object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: The tags. - :type properties: dict[str, str] - :ivar id: The Event Hub-compatible consumer group identifier. - :vartype id: str - :ivar name: The Event Hub-compatible consumer group name. - :vartype name: str - :ivar type: the resource type. - :vartype type: str - :ivar etag: The etag. - :vartype etag: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': '{str}'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(EventHubConsumerGroupInfo, self).__init__(**kwargs) - self.properties = properties - self.id = None - self.name = None - self.type = None - self.etag = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties.py deleted file mode 100644 index 8bdf6ac53f20..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventHubProperties(Model): - """The properties of the provisioned Event Hub-compatible endpoint used by the - IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param retention_time_in_days: The retention time for device-to-cloud - messages in days. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages - :type retention_time_in_days: long - :param partition_count: The number of partitions for receiving - device-to-cloud messages in the Event Hub-compatible endpoint. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. - :type partition_count: int - :ivar partition_ids: The partition ids in the Event Hub-compatible - endpoint. - :vartype partition_ids: list[str] - :ivar path: The Event Hub-compatible name. - :vartype path: str - :ivar endpoint: The Event Hub-compatible endpoint. - :vartype endpoint: str - """ - - _validation = { - 'partition_ids': {'readonly': True}, - 'path': {'readonly': True}, - 'endpoint': {'readonly': True}, - } - - _attribute_map = { - 'retention_time_in_days': {'key': 'retentionTimeInDays', 'type': 'long'}, - 'partition_count': {'key': 'partitionCount', 'type': 'int'}, - 'partition_ids': {'key': 'partitionIds', 'type': '[str]'}, - 'path': {'key': 'path', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventHubProperties, self).__init__(**kwargs) - self.retention_time_in_days = kwargs.get('retention_time_in_days', None) - self.partition_count = kwargs.get('partition_count', None) - self.partition_ids = None - self.path = None - self.endpoint = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties_py3.py deleted file mode 100644 index 9a53091d02f8..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/event_hub_properties_py3.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventHubProperties(Model): - """The properties of the provisioned Event Hub-compatible endpoint used by the - IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param retention_time_in_days: The retention time for device-to-cloud - messages in days. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages - :type retention_time_in_days: long - :param partition_count: The number of partitions for receiving - device-to-cloud messages in the Event Hub-compatible endpoint. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages. - :type partition_count: int - :ivar partition_ids: The partition ids in the Event Hub-compatible - endpoint. - :vartype partition_ids: list[str] - :ivar path: The Event Hub-compatible name. - :vartype path: str - :ivar endpoint: The Event Hub-compatible endpoint. - :vartype endpoint: str - """ - - _validation = { - 'partition_ids': {'readonly': True}, - 'path': {'readonly': True}, - 'endpoint': {'readonly': True}, - } - - _attribute_map = { - 'retention_time_in_days': {'key': 'retentionTimeInDays', 'type': 'long'}, - 'partition_count': {'key': 'partitionCount', 'type': 'int'}, - 'partition_ids': {'key': 'partitionIds', 'type': '[str]'}, - 'path': {'key': 'path', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'str'}, - } - - def __init__(self, *, retention_time_in_days: int=None, partition_count: int=None, **kwargs) -> None: - super(EventHubProperties, self).__init__(**kwargs) - self.retention_time_in_days = retention_time_in_days - self.partition_count = partition_count - self.partition_ids = None - self.path = None - self.endpoint = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request.py deleted file mode 100644 index 2ae6463c8681..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportDevicesRequest(Model): - """Use to provide parameters when requesting an export of all devices in the - IoT hub. - - All required parameters must be populated in order to send to Azure. - - :param export_blob_container_uri: Required. The export blob container URI. - :type export_blob_container_uri: str - :param exclude_keys: Required. The value indicating whether keys should be - excluded during export. - :type exclude_keys: bool - """ - - _validation = { - 'export_blob_container_uri': {'required': True}, - 'exclude_keys': {'required': True}, - } - - _attribute_map = { - 'export_blob_container_uri': {'key': 'exportBlobContainerUri', 'type': 'str'}, - 'exclude_keys': {'key': 'excludeKeys', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(ExportDevicesRequest, self).__init__(**kwargs) - self.export_blob_container_uri = kwargs.get('export_blob_container_uri', None) - self.exclude_keys = kwargs.get('exclude_keys', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request_py3.py deleted file mode 100644 index 1e616734a4ea..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/export_devices_request_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ExportDevicesRequest(Model): - """Use to provide parameters when requesting an export of all devices in the - IoT hub. - - All required parameters must be populated in order to send to Azure. - - :param export_blob_container_uri: Required. The export blob container URI. - :type export_blob_container_uri: str - :param exclude_keys: Required. The value indicating whether keys should be - excluded during export. - :type exclude_keys: bool - """ - - _validation = { - 'export_blob_container_uri': {'required': True}, - 'exclude_keys': {'required': True}, - } - - _attribute_map = { - 'export_blob_container_uri': {'key': 'exportBlobContainerUri', 'type': 'str'}, - 'exclude_keys': {'key': 'excludeKeys', 'type': 'bool'}, - } - - def __init__(self, *, export_blob_container_uri: str, exclude_keys: bool, **kwargs) -> None: - super(ExportDevicesRequest, self).__init__(**kwargs) - self.export_blob_container_uri = export_blob_container_uri - self.exclude_keys = exclude_keys diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input.py deleted file mode 100644 index b5dfb7ae9fa3..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverInput(Model): - """Use to provide failover region when requesting manual Failover for a hub. - - All required parameters must be populated in order to send to Azure. - - :param failover_region: Required. Region the hub will be failed over to - :type failover_region: str - """ - - _validation = { - 'failover_region': {'required': True}, - } - - _attribute_map = { - 'failover_region': {'key': 'failoverRegion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(FailoverInput, self).__init__(**kwargs) - self.failover_region = kwargs.get('failover_region', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input_py3.py deleted file mode 100644 index ef122f223f28..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/failover_input_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FailoverInput(Model): - """Use to provide failover region when requesting manual Failover for a hub. - - All required parameters must be populated in order to send to Azure. - - :param failover_region: Required. Region the hub will be failed over to - :type failover_region: str - """ - - _validation = { - 'failover_region': {'required': True}, - } - - _attribute_map = { - 'failover_region': {'key': 'failoverRegion', 'type': 'str'}, - } - - def __init__(self, *, failover_region: str, **kwargs) -> None: - super(FailoverInput, self).__init__(**kwargs) - self.failover_region = failover_region diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties.py deleted file mode 100644 index b93285c2a10b..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FallbackRouteProperties(Model): - """The properties of the fallback route. IoT Hub uses these properties when it - routes messages to the fallback endpoint. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the route. The name can only include alphanumeric - characters, periods, underscores, hyphens, has a maximum length of 64 - characters, and must be unique. - :type name: str - :ivar source: Required. The source to which the routing rule is to be - applied to. For example, DeviceMessages. Default value: "DeviceMessages" . - :vartype source: str - :param condition: The condition which is evaluated in order to apply the - fallback route. If the condition is not provided it will evaluate to true - by default. For grammar, See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language - :type condition: str - :param endpoint_names: Required. The list of endpoints to which the - messages that satisfy the condition are routed to. Currently only 1 - endpoint is allowed. - :type endpoint_names: list[str] - :param is_enabled: Required. Used to specify whether the fallback route is - enabled. - :type is_enabled: bool - """ - - _validation = { - 'source': {'required': True, 'constant': True}, - 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, - 'is_enabled': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'condition': {'key': 'condition', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - } - - source = "DeviceMessages" - - def __init__(self, **kwargs): - super(FallbackRouteProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.condition = kwargs.get('condition', None) - self.endpoint_names = kwargs.get('endpoint_names', None) - self.is_enabled = kwargs.get('is_enabled', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties_py3.py deleted file mode 100644 index f70e677c4932..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/fallback_route_properties_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FallbackRouteProperties(Model): - """The properties of the fallback route. IoT Hub uses these properties when it - routes messages to the fallback endpoint. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: The name of the route. The name can only include alphanumeric - characters, periods, underscores, hyphens, has a maximum length of 64 - characters, and must be unique. - :type name: str - :ivar source: Required. The source to which the routing rule is to be - applied to. For example, DeviceMessages. Default value: "DeviceMessages" . - :vartype source: str - :param condition: The condition which is evaluated in order to apply the - fallback route. If the condition is not provided it will evaluate to true - by default. For grammar, See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language - :type condition: str - :param endpoint_names: Required. The list of endpoints to which the - messages that satisfy the condition are routed to. Currently only 1 - endpoint is allowed. - :type endpoint_names: list[str] - :param is_enabled: Required. Used to specify whether the fallback route is - enabled. - :type is_enabled: bool - """ - - _validation = { - 'source': {'required': True, 'constant': True}, - 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, - 'is_enabled': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'condition': {'key': 'condition', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - } - - source = "DeviceMessages" - - def __init__(self, *, endpoint_names, is_enabled: bool, name: str=None, condition: str=None, **kwargs) -> None: - super(FallbackRouteProperties, self).__init__(**kwargs) - self.name = name - self.condition = condition - self.endpoint_names = endpoint_names - self.is_enabled = is_enabled diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties.py deleted file mode 100644 index f1adc53ec853..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FeedbackProperties(Model): - """The properties of the feedback queue for cloud-to-device messages. - - :param lock_duration_as_iso8601: The lock duration for the feedback queue. - See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type lock_duration_as_iso8601: timedelta - :param ttl_as_iso8601: The period of time for which a message is available - to consume before it is expired by the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type ttl_as_iso8601: timedelta - :param max_delivery_count: The number of times the IoT hub attempts to - deliver a message on the feedback queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type max_delivery_count: int - """ - - _validation = { - 'max_delivery_count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, - 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, - 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(FeedbackProperties, self).__init__(**kwargs) - self.lock_duration_as_iso8601 = kwargs.get('lock_duration_as_iso8601', None) - self.ttl_as_iso8601 = kwargs.get('ttl_as_iso8601', None) - self.max_delivery_count = kwargs.get('max_delivery_count', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties_py3.py deleted file mode 100644 index b9b2e2bea2d1..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/feedback_properties_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class FeedbackProperties(Model): - """The properties of the feedback queue for cloud-to-device messages. - - :param lock_duration_as_iso8601: The lock duration for the feedback queue. - See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type lock_duration_as_iso8601: timedelta - :param ttl_as_iso8601: The period of time for which a message is available - to consume before it is expired by the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type ttl_as_iso8601: timedelta - :param max_delivery_count: The number of times the IoT hub attempts to - deliver a message on the feedback queue. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. - :type max_delivery_count: int - """ - - _validation = { - 'max_delivery_count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, - 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, - 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, - } - - def __init__(self, *, lock_duration_as_iso8601=None, ttl_as_iso8601=None, max_delivery_count: int=None, **kwargs) -> None: - super(FeedbackProperties, self).__init__(**kwargs) - self.lock_duration_as_iso8601 = lock_duration_as_iso8601 - self.ttl_as_iso8601 = ttl_as_iso8601 - self.max_delivery_count = max_delivery_count diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request.py deleted file mode 100644 index 2280c00ee4a0..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportDevicesRequest(Model): - """Use to provide parameters when requesting an import of all devices in the - hub. - - All required parameters must be populated in order to send to Azure. - - :param input_blob_container_uri: Required. The input blob container URI. - :type input_blob_container_uri: str - :param output_blob_container_uri: Required. The output blob container URI. - :type output_blob_container_uri: str - """ - - _validation = { - 'input_blob_container_uri': {'required': True}, - 'output_blob_container_uri': {'required': True}, - } - - _attribute_map = { - 'input_blob_container_uri': {'key': 'inputBlobContainerUri', 'type': 'str'}, - 'output_blob_container_uri': {'key': 'outputBlobContainerUri', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImportDevicesRequest, self).__init__(**kwargs) - self.input_blob_container_uri = kwargs.get('input_blob_container_uri', None) - self.output_blob_container_uri = kwargs.get('output_blob_container_uri', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request_py3.py deleted file mode 100644 index c97a6611d35a..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/import_devices_request_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ImportDevicesRequest(Model): - """Use to provide parameters when requesting an import of all devices in the - hub. - - All required parameters must be populated in order to send to Azure. - - :param input_blob_container_uri: Required. The input blob container URI. - :type input_blob_container_uri: str - :param output_blob_container_uri: Required. The output blob container URI. - :type output_blob_container_uri: str - """ - - _validation = { - 'input_blob_container_uri': {'required': True}, - 'output_blob_container_uri': {'required': True}, - } - - _attribute_map = { - 'input_blob_container_uri': {'key': 'inputBlobContainerUri', 'type': 'str'}, - 'output_blob_container_uri': {'key': 'outputBlobContainerUri', 'type': 'str'}, - } - - def __init__(self, *, input_blob_container_uri: str, output_blob_container_uri: str, **kwargs) -> None: - super(ImportDevicesRequest, self).__init__(**kwargs) - self.input_blob_container_uri = input_blob_container_uri - self.output_blob_container_uri = output_blob_container_uri diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity.py deleted file mode 100644 index c8bdfb3c51fc..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubCapacity(Model): - """IoT Hub capacity information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum number of units. - :vartype minimum: long - :ivar maximum: The maximum number of units. - :vartype maximum: long - :ivar default: The default number of units. - :vartype default: long - :ivar scale_type: The type of the scaling enabled. Possible values - include: 'Automatic', 'Manual', 'None' - :vartype scale_type: str or ~azure.mgmt.iothub.models.IotHubScaleType - """ - - _validation = { - 'minimum': {'readonly': True, 'maximum': 1, 'minimum': 1}, - 'maximum': {'readonly': True}, - 'default': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default': {'key': 'default', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'IotHubScaleType'}, - } - - def __init__(self, **kwargs): - super(IotHubCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity_py3.py deleted file mode 100644 index 9b2092edc2ec..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_capacity_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubCapacity(Model): - """IoT Hub capacity information. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar minimum: The minimum number of units. - :vartype minimum: long - :ivar maximum: The maximum number of units. - :vartype maximum: long - :ivar default: The default number of units. - :vartype default: long - :ivar scale_type: The type of the scaling enabled. Possible values - include: 'Automatic', 'Manual', 'None' - :vartype scale_type: str or ~azure.mgmt.iothub.models.IotHubScaleType - """ - - _validation = { - 'minimum': {'readonly': True, 'maximum': 1, 'minimum': 1}, - 'maximum': {'readonly': True}, - 'default': {'readonly': True}, - 'scale_type': {'readonly': True}, - } - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'long'}, - 'maximum': {'key': 'maximum', 'type': 'long'}, - 'default': {'key': 'default', 'type': 'long'}, - 'scale_type': {'key': 'scaleType', 'type': 'IotHubScaleType'}, - } - - def __init__(self, **kwargs) -> None: - super(IotHubCapacity, self).__init__(**kwargs) - self.minimum = None - self.maximum = None - self.default = None - self.scale_type = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description.py deleted file mode 100644 index ce2fa05c9870..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource import Resource - - -class IotHubDescription(Resource): - """The description of the IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param etag: The Etag field is *not* required. If it is provided in the - response body, it must also be provided as a header per the normal ETag - convention. - :type etag: str - :param properties: IotHub properties - :type properties: ~azure.mgmt.iothub.models.IotHubProperties - :param sku: Required. IotHub SKU info - :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IotHubProperties'}, - 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, - } - - def __init__(self, **kwargs): - super(IotHubDescription, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.properties = kwargs.get('properties', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_paged.py deleted file mode 100644 index ea5d7b3b3832..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IotHubDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`IotHubDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IotHubDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(IotHubDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_py3.py deleted file mode 100644 index 74b29768460e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_description_py3.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .resource_py3 import Resource - - -class IotHubDescription(Resource): - """The description of the IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param etag: The Etag field is *not* required. If it is provided in the - response body, it must also be provided as a header per the normal ETag - convention. - :type etag: str - :param properties: IotHub properties - :type properties: ~azure.mgmt.iothub.models.IotHubProperties - :param sku: Required. IotHub SKU info - :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IotHubProperties'}, - 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, - } - - def __init__(self, *, location: str, sku, tags=None, etag: str=None, properties=None, **kwargs) -> None: - super(IotHubDescription, self).__init__(location=location, tags=tags, **kwargs) - self.etag = etag - self.properties = properties - self.sku = sku diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info.py deleted file mode 100644 index 83717c1fce1f..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubNameAvailabilityInfo(Model): - """The properties indicating whether a given IoT hub name is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name_available: The value which indicates whether the provided name - is available. - :vartype name_available: bool - :ivar reason: The reason for unavailability. Possible values include: - 'Invalid', 'AlreadyExists' - :vartype reason: str or - ~azure.mgmt.iothub.models.IotHubNameUnavailabilityReason - :param message: The detailed reason message. - :type message: str - """ - - _validation = { - 'name_available': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'IotHubNameUnavailabilityReason'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IotHubNameAvailabilityInfo, self).__init__(**kwargs) - self.name_available = None - self.reason = None - self.message = kwargs.get('message', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info_py3.py deleted file mode 100644 index e782c872d683..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_name_availability_info_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubNameAvailabilityInfo(Model): - """The properties indicating whether a given IoT hub name is available. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name_available: The value which indicates whether the provided name - is available. - :vartype name_available: bool - :ivar reason: The reason for unavailability. Possible values include: - 'Invalid', 'AlreadyExists' - :vartype reason: str or - ~azure.mgmt.iothub.models.IotHubNameUnavailabilityReason - :param message: The detailed reason message. - :type message: str - """ - - _validation = { - 'name_available': {'readonly': True}, - 'reason': {'readonly': True}, - } - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'IotHubNameUnavailabilityReason'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, message: str=None, **kwargs) -> None: - super(IotHubNameAvailabilityInfo, self).__init__(**kwargs) - self.name_available = None - self.reason = None - self.message = message diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties.py deleted file mode 100644 index f2de6554773e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubProperties(Model): - """The properties of an IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param authorization_policies: The shared access policies you can use to - secure a connection to the IoT hub. - :type authorization_policies: - list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] - :param ip_filter_rules: The IP filter rules. - :type ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule] - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - :ivar state: The hub state. - :vartype state: str - :ivar host_name: The name of the host. - :vartype host_name: str - :param event_hub_endpoints: The Event Hub-compatible endpoint properties. - The only possible keys to this dictionary is events. This key has to be - present in the dictionary while making create or update calls for the IoT - hub. - :type event_hub_endpoints: dict[str, - ~azure.mgmt.iothub.models.EventHubProperties] - :param routing: - :type routing: ~azure.mgmt.iothub.models.RoutingProperties - :param storage_endpoints: The list of Azure Storage endpoints where you - can upload files. Currently you can configure only one Azure Storage - account and that MUST have its key as $default. Specifying more than one - storage account causes an error to be thrown. Not specifying a value for - this property when the enableFileUploadNotifications property is set to - True, causes an error to be thrown. - :type storage_endpoints: dict[str, - ~azure.mgmt.iothub.models.StorageEndpointProperties] - :param messaging_endpoints: The messaging endpoint properties for the file - upload notification queue. - :type messaging_endpoints: dict[str, - ~azure.mgmt.iothub.models.MessagingEndpointProperties] - :param enable_file_upload_notifications: If True, file upload - notifications are enabled. - :type enable_file_upload_notifications: bool - :param cloud_to_device: - :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties - :param comments: IoT hub comments. - :type comments: str - :param device_streams: The device streams properties of iothub. - :type device_streams: - ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams - :param features: The capabilities and features enabled for the IoT hub. - Possible values include: 'None', 'DeviceManagement' - :type features: str or ~azure.mgmt.iothub.models.Capabilities - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'state': {'readonly': True}, - 'host_name': {'readonly': True}, - } - - _attribute_map = { - 'authorization_policies': {'key': 'authorizationPolicies', 'type': '[SharedAccessSignatureAuthorizationRule]'}, - 'ip_filter_rules': {'key': 'ipFilterRules', 'type': '[IpFilterRule]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'host_name': {'key': 'hostName', 'type': 'str'}, - 'event_hub_endpoints': {'key': 'eventHubEndpoints', 'type': '{EventHubProperties}'}, - 'routing': {'key': 'routing', 'type': 'RoutingProperties'}, - 'storage_endpoints': {'key': 'storageEndpoints', 'type': '{StorageEndpointProperties}'}, - 'messaging_endpoints': {'key': 'messagingEndpoints', 'type': '{MessagingEndpointProperties}'}, - 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, - 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, - 'features': {'key': 'features', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IotHubProperties, self).__init__(**kwargs) - self.authorization_policies = kwargs.get('authorization_policies', None) - self.ip_filter_rules = kwargs.get('ip_filter_rules', None) - self.provisioning_state = None - self.state = None - self.host_name = None - self.event_hub_endpoints = kwargs.get('event_hub_endpoints', None) - self.routing = kwargs.get('routing', None) - self.storage_endpoints = kwargs.get('storage_endpoints', None) - self.messaging_endpoints = kwargs.get('messaging_endpoints', None) - self.enable_file_upload_notifications = kwargs.get('enable_file_upload_notifications', None) - self.cloud_to_device = kwargs.get('cloud_to_device', None) - self.comments = kwargs.get('comments', None) - self.device_streams = kwargs.get('device_streams', None) - self.features = kwargs.get('features', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams.py deleted file mode 100644 index 985693ac090f..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubPropertiesDeviceStreams(Model): - """The device streams properties of iothub. - - :param streaming_endpoints: List of Device Streams Endpoints. - :type streaming_endpoints: list[str] - """ - - _attribute_map = { - 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) - self.streaming_endpoints = kwargs.get('streaming_endpoints', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams_py3.py deleted file mode 100644 index d35247cc448c..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_device_streams_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubPropertiesDeviceStreams(Model): - """The device streams properties of iothub. - - :param streaming_endpoints: List of Device Streams Endpoints. - :type streaming_endpoints: list[str] - """ - - _attribute_map = { - 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, - } - - def __init__(self, *, streaming_endpoints=None, **kwargs) -> None: - super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) - self.streaming_endpoints = streaming_endpoints diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_py3.py deleted file mode 100644 index 6868384752fc..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_properties_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubProperties(Model): - """The properties of an IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param authorization_policies: The shared access policies you can use to - secure a connection to the IoT hub. - :type authorization_policies: - list[~azure.mgmt.iothub.models.SharedAccessSignatureAuthorizationRule] - :param ip_filter_rules: The IP filter rules. - :type ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule] - :ivar provisioning_state: The provisioning state. - :vartype provisioning_state: str - :ivar state: The hub state. - :vartype state: str - :ivar host_name: The name of the host. - :vartype host_name: str - :param event_hub_endpoints: The Event Hub-compatible endpoint properties. - The only possible keys to this dictionary is events. This key has to be - present in the dictionary while making create or update calls for the IoT - hub. - :type event_hub_endpoints: dict[str, - ~azure.mgmt.iothub.models.EventHubProperties] - :param routing: - :type routing: ~azure.mgmt.iothub.models.RoutingProperties - :param storage_endpoints: The list of Azure Storage endpoints where you - can upload files. Currently you can configure only one Azure Storage - account and that MUST have its key as $default. Specifying more than one - storage account causes an error to be thrown. Not specifying a value for - this property when the enableFileUploadNotifications property is set to - True, causes an error to be thrown. - :type storage_endpoints: dict[str, - ~azure.mgmt.iothub.models.StorageEndpointProperties] - :param messaging_endpoints: The messaging endpoint properties for the file - upload notification queue. - :type messaging_endpoints: dict[str, - ~azure.mgmt.iothub.models.MessagingEndpointProperties] - :param enable_file_upload_notifications: If True, file upload - notifications are enabled. - :type enable_file_upload_notifications: bool - :param cloud_to_device: - :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties - :param comments: IoT hub comments. - :type comments: str - :param device_streams: The device streams properties of iothub. - :type device_streams: - ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams - :param features: The capabilities and features enabled for the IoT hub. - Possible values include: 'None', 'DeviceManagement' - :type features: str or ~azure.mgmt.iothub.models.Capabilities - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - 'state': {'readonly': True}, - 'host_name': {'readonly': True}, - } - - _attribute_map = { - 'authorization_policies': {'key': 'authorizationPolicies', 'type': '[SharedAccessSignatureAuthorizationRule]'}, - 'ip_filter_rules': {'key': 'ipFilterRules', 'type': '[IpFilterRule]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'host_name': {'key': 'hostName', 'type': 'str'}, - 'event_hub_endpoints': {'key': 'eventHubEndpoints', 'type': '{EventHubProperties}'}, - 'routing': {'key': 'routing', 'type': 'RoutingProperties'}, - 'storage_endpoints': {'key': 'storageEndpoints', 'type': '{StorageEndpointProperties}'}, - 'messaging_endpoints': {'key': 'messagingEndpoints', 'type': '{MessagingEndpointProperties}'}, - 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, - 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, - 'comments': {'key': 'comments', 'type': 'str'}, - 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, - 'features': {'key': 'features', 'type': 'str'}, - } - - def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications: bool=None, cloud_to_device=None, comments: str=None, device_streams=None, features=None, **kwargs) -> None: - super(IotHubProperties, self).__init__(**kwargs) - self.authorization_policies = authorization_policies - self.ip_filter_rules = ip_filter_rules - self.provisioning_state = None - self.state = None - self.host_name = None - self.event_hub_endpoints = event_hub_endpoints - self.routing = routing - self.storage_endpoints = storage_endpoints - self.messaging_endpoints = messaging_endpoints - self.enable_file_upload_notifications = enable_file_upload_notifications - self.cloud_to_device = cloud_to_device - self.comments = comments - self.device_streams = device_streams - self.features = features diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info.py deleted file mode 100644 index 4f00a25913ee..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubQuotaMetricInfo(Model): - """Quota metrics properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the quota metric. - :vartype name: str - :ivar current_value: The current value for the quota metric. - :vartype current_value: long - :ivar max_value: The maximum value of the quota metric. - :vartype max_value: long - """ - - _validation = { - 'name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'max_value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'max_value': {'key': 'maxValue', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(IotHubQuotaMetricInfo, self).__init__(**kwargs) - self.name = None - self.current_value = None - self.max_value = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_paged.py deleted file mode 100644 index 4ef7809a54a5..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IotHubQuotaMetricInfoPaged(Paged): - """ - A paging container for iterating over a list of :class:`IotHubQuotaMetricInfo ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IotHubQuotaMetricInfo]'} - } - - def __init__(self, *args, **kwargs): - - super(IotHubQuotaMetricInfoPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_py3.py deleted file mode 100644 index 31d074c5f5e0..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_quota_metric_info_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubQuotaMetricInfo(Model): - """Quota metrics properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the quota metric. - :vartype name: str - :ivar current_value: The current value for the quota metric. - :vartype current_value: long - :ivar max_value: The maximum value of the quota metric. - :vartype max_value: long - """ - - _validation = { - 'name': {'readonly': True}, - 'current_value': {'readonly': True}, - 'max_value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'max_value': {'key': 'maxValue', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(IotHubQuotaMetricInfo, self).__init__(**kwargs) - self.name = None - self.current_value = None - self.max_value = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description.py deleted file mode 100644 index b21fec3001d0..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubSkuDescription(Model): - """SKU properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar resource_type: The type of the resource. - :vartype resource_type: str - :param sku: Required. The type of the resource. - :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo - :param capacity: Required. IotHub capacity - :type capacity: ~azure.mgmt.iothub.models.IotHubCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'required': True}, - 'capacity': {'required': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, - 'capacity': {'key': 'capacity', 'type': 'IotHubCapacity'}, - } - - def __init__(self, **kwargs): - super(IotHubSkuDescription, self).__init__(**kwargs) - self.resource_type = None - self.sku = kwargs.get('sku', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_paged.py deleted file mode 100644 index 49f6251cb269..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class IotHubSkuDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`IotHubSkuDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IotHubSkuDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(IotHubSkuDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_py3.py deleted file mode 100644 index 7aa551a81b79..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_description_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubSkuDescription(Model): - """SKU properties. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar resource_type: The type of the resource. - :vartype resource_type: str - :param sku: Required. The type of the resource. - :type sku: ~azure.mgmt.iothub.models.IotHubSkuInfo - :param capacity: Required. IotHub capacity - :type capacity: ~azure.mgmt.iothub.models.IotHubCapacity - """ - - _validation = { - 'resource_type': {'readonly': True}, - 'sku': {'required': True}, - 'capacity': {'required': True}, - } - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'IotHubSkuInfo'}, - 'capacity': {'key': 'capacity', 'type': 'IotHubCapacity'}, - } - - def __init__(self, *, sku, capacity, **kwargs) -> None: - super(IotHubSkuDescription, self).__init__(**kwargs) - self.resource_type = None - self.sku = sku - self.capacity = capacity diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info.py deleted file mode 100644 index 053110390967..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubSkuInfo(Model): - """Information about the SKU of the IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Possible values include: 'F1', - 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' - :type name: str or ~azure.mgmt.iothub.models.IotHubSku - :ivar tier: The billing tier for the IoT hub. Possible values include: - 'Free', 'Standard', 'Basic' - :vartype tier: str or ~azure.mgmt.iothub.models.IotHubSkuTier - :param capacity: The number of provisioned IoT Hub units. See: - https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. - :type capacity: long - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'IotHubSkuTier'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(IotHubSkuInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = None - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info_py3.py deleted file mode 100644 index 97ffbf5dd145..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/iot_hub_sku_info_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IotHubSkuInfo(Model): - """Information about the SKU of the IoT hub. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Possible values include: 'F1', - 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' - :type name: str or ~azure.mgmt.iothub.models.IotHubSku - :ivar tier: The billing tier for the IoT hub. Possible values include: - 'Free', 'Standard', 'Basic' - :vartype tier: str or ~azure.mgmt.iothub.models.IotHubSkuTier - :param capacity: The number of provisioned IoT Hub units. See: - https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits. - :type capacity: long - """ - - _validation = { - 'name': {'required': True}, - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'IotHubSkuTier'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, *, name, capacity: int=None, **kwargs) -> None: - super(IotHubSkuInfo, self).__init__(**kwargs) - self.name = name - self.tier = None - self.capacity = capacity diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule.py deleted file mode 100644 index 5a24c50dca0a..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IpFilterRule(Model): - """The IP filter rules for the IoT hub. - - All required parameters must be populated in order to send to Azure. - - :param filter_name: Required. The name of the IP filter rule. - :type filter_name: str - :param action: Required. The desired action for requests captured by this - rule. Possible values include: 'Accept', 'Reject' - :type action: str or ~azure.mgmt.iothub.models.IpFilterActionType - :param ip_mask: Required. A string that contains the IP address range in - CIDR notation for the rule. - :type ip_mask: str - """ - - _validation = { - 'filter_name': {'required': True}, - 'action': {'required': True}, - 'ip_mask': {'required': True}, - } - - _attribute_map = { - 'filter_name': {'key': 'filterName', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'IpFilterActionType'}, - 'ip_mask': {'key': 'ipMask', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IpFilterRule, self).__init__(**kwargs) - self.filter_name = kwargs.get('filter_name', None) - self.action = kwargs.get('action', None) - self.ip_mask = kwargs.get('ip_mask', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule_py3.py deleted file mode 100644 index 595a36af4810..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/ip_filter_rule_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class IpFilterRule(Model): - """The IP filter rules for the IoT hub. - - All required parameters must be populated in order to send to Azure. - - :param filter_name: Required. The name of the IP filter rule. - :type filter_name: str - :param action: Required. The desired action for requests captured by this - rule. Possible values include: 'Accept', 'Reject' - :type action: str or ~azure.mgmt.iothub.models.IpFilterActionType - :param ip_mask: Required. A string that contains the IP address range in - CIDR notation for the rule. - :type ip_mask: str - """ - - _validation = { - 'filter_name': {'required': True}, - 'action': {'required': True}, - 'ip_mask': {'required': True}, - } - - _attribute_map = { - 'filter_name': {'key': 'filterName', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'IpFilterActionType'}, - 'ip_mask': {'key': 'ipMask', 'type': 'str'}, - } - - def __init__(self, *, filter_name: str, action, ip_mask: str, **kwargs) -> None: - super(IpFilterRule, self).__init__(**kwargs) - self.filter_name = filter_name - self.action = action - self.ip_mask = ip_mask diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response.py deleted file mode 100644 index 59b82d247244..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobResponse(Model): - """The properties of the Job Response object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar job_id: The job identifier. - :vartype job_id: str - :ivar start_time_utc: The start time of the job. - :vartype start_time_utc: datetime - :ivar end_time_utc: The time the job stopped processing. - :vartype end_time_utc: datetime - :ivar type: The type of the job. Possible values include: 'unknown', - 'export', 'import', 'backup', 'readDeviceProperties', - 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', - 'factoryResetDevice', 'firmwareUpdate' - :vartype type: str or ~azure.mgmt.iothub.models.JobType - :ivar status: The status of the job. Possible values include: 'unknown', - 'enqueued', 'running', 'completed', 'failed', 'cancelled' - :vartype status: str or ~azure.mgmt.iothub.models.JobStatus - :ivar failure_reason: If status == failed, this string containing the - reason for the failure. - :vartype failure_reason: str - :ivar status_message: The status message for the job. - :vartype status_message: str - :ivar parent_job_id: The job identifier of the parent job, if any. - :vartype parent_job_id: str - """ - - _validation = { - 'job_id': {'readonly': True}, - 'start_time_utc': {'readonly': True}, - 'end_time_utc': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - 'failure_reason': {'readonly': True}, - 'status_message': {'readonly': True}, - 'parent_job_id': {'readonly': True}, - } - - _attribute_map = { - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'start_time_utc': {'key': 'startTimeUtc', 'type': 'rfc-1123'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'rfc-1123'}, - 'type': {'key': 'type', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'JobStatus'}, - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'status_message': {'key': 'statusMessage', 'type': 'str'}, - 'parent_job_id': {'key': 'parentJobId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(JobResponse, self).__init__(**kwargs) - self.job_id = None - self.start_time_utc = None - self.end_time_utc = None - self.type = None - self.status = None - self.failure_reason = None - self.status_message = None - self.parent_job_id = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_paged.py deleted file mode 100644 index f4a6dd7f59ee..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class JobResponsePaged(Paged): - """ - A paging container for iterating over a list of :class:`JobResponse ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[JobResponse]'} - } - - def __init__(self, *args, **kwargs): - - super(JobResponsePaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_py3.py deleted file mode 100644 index 88415188e0a7..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/job_response_py3.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class JobResponse(Model): - """The properties of the Job Response object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar job_id: The job identifier. - :vartype job_id: str - :ivar start_time_utc: The start time of the job. - :vartype start_time_utc: datetime - :ivar end_time_utc: The time the job stopped processing. - :vartype end_time_utc: datetime - :ivar type: The type of the job. Possible values include: 'unknown', - 'export', 'import', 'backup', 'readDeviceProperties', - 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', - 'factoryResetDevice', 'firmwareUpdate' - :vartype type: str or ~azure.mgmt.iothub.models.JobType - :ivar status: The status of the job. Possible values include: 'unknown', - 'enqueued', 'running', 'completed', 'failed', 'cancelled' - :vartype status: str or ~azure.mgmt.iothub.models.JobStatus - :ivar failure_reason: If status == failed, this string containing the - reason for the failure. - :vartype failure_reason: str - :ivar status_message: The status message for the job. - :vartype status_message: str - :ivar parent_job_id: The job identifier of the parent job, if any. - :vartype parent_job_id: str - """ - - _validation = { - 'job_id': {'readonly': True}, - 'start_time_utc': {'readonly': True}, - 'end_time_utc': {'readonly': True}, - 'type': {'readonly': True}, - 'status': {'readonly': True}, - 'failure_reason': {'readonly': True}, - 'status_message': {'readonly': True}, - 'parent_job_id': {'readonly': True}, - } - - _attribute_map = { - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'start_time_utc': {'key': 'startTimeUtc', 'type': 'rfc-1123'}, - 'end_time_utc': {'key': 'endTimeUtc', 'type': 'rfc-1123'}, - 'type': {'key': 'type', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'JobStatus'}, - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'status_message': {'key': 'statusMessage', 'type': 'str'}, - 'parent_job_id': {'key': 'parentJobId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(JobResponse, self).__init__(**kwargs) - self.job_id = None - self.start_time_utc = None - self.end_time_utc = None - self.type = None - self.status = None - self.failure_reason = None - self.status_message = None - self.parent_job_id = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route.py deleted file mode 100644 index c0734abfdece..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MatchedRoute(Model): - """Routes that matched. - - :param properties: Properties of routes that matched - :type properties: ~azure.mgmt.iothub.models.RouteProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RouteProperties'}, - } - - def __init__(self, **kwargs): - super(MatchedRoute, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route_py3.py deleted file mode 100644 index eecd24fd49b7..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/matched_route_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MatchedRoute(Model): - """Routes that matched. - - :param properties: Properties of routes that matched - :type properties: ~azure.mgmt.iothub.models.RouteProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'RouteProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(MatchedRoute, self).__init__(**kwargs) - self.properties = properties diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties.py deleted file mode 100644 index 576bd3c0aa2a..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MessagingEndpointProperties(Model): - """The properties of the messaging endpoints used by this IoT hub. - - :param lock_duration_as_iso8601: The lock duration. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :type lock_duration_as_iso8601: timedelta - :param ttl_as_iso8601: The period of time for which a message is available - to consume before it is expired by the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :type ttl_as_iso8601: timedelta - :param max_delivery_count: The number of times the IoT hub attempts to - deliver a message. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :type max_delivery_count: int - """ - - _validation = { - 'max_delivery_count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, - 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, - 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(MessagingEndpointProperties, self).__init__(**kwargs) - self.lock_duration_as_iso8601 = kwargs.get('lock_duration_as_iso8601', None) - self.ttl_as_iso8601 = kwargs.get('ttl_as_iso8601', None) - self.max_delivery_count = kwargs.get('max_delivery_count', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties_py3.py deleted file mode 100644 index f3d0d8c5f122..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/messaging_endpoint_properties_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MessagingEndpointProperties(Model): - """The properties of the messaging endpoints used by this IoT hub. - - :param lock_duration_as_iso8601: The lock duration. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :type lock_duration_as_iso8601: timedelta - :param ttl_as_iso8601: The period of time for which a message is available - to consume before it is expired by the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :type ttl_as_iso8601: timedelta - :param max_delivery_count: The number of times the IoT hub attempts to - deliver a message. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. - :type max_delivery_count: int - """ - - _validation = { - 'max_delivery_count': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'lock_duration_as_iso8601': {'key': 'lockDurationAsIso8601', 'type': 'duration'}, - 'ttl_as_iso8601': {'key': 'ttlAsIso8601', 'type': 'duration'}, - 'max_delivery_count': {'key': 'maxDeliveryCount', 'type': 'int'}, - } - - def __init__(self, *, lock_duration_as_iso8601=None, ttl_as_iso8601=None, max_delivery_count: int=None, **kwargs) -> None: - super(MessagingEndpointProperties, self).__init__(**kwargs) - self.lock_duration_as_iso8601 = lock_duration_as_iso8601 - self.ttl_as_iso8601 = ttl_as_iso8601 - self.max_delivery_count = max_delivery_count diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name.py deleted file mode 100644 index 119fdb10cea5..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Name(Model): - """Name of Iot Hub type. - - :param value: IotHub type - :type value: str - :param localized_value: Localized value of name - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Name, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name_py3.py deleted file mode 100644 index d40236f73bc7..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Name(Model): - """Name of Iot Hub type. - - :param value: IotHub type - :type value: str - :param localized_value: Localized value of name - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(Name, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation.py deleted file mode 100644 index 1730239229f4..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """IoT Hub REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{read | write | action | - delete} - :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.iothub.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = kwargs.get('display', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display.py deleted file mode 100644 index 1be587a52f9d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft Devices - :vartype provider: str - :ivar resource: Resource Type: IotHubs - :vartype resource: str - :ivar operation: Name of the operation - :vartype operation: str - :ivar description: Description of the operation - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display_py3.py deleted file mode 100644 index 6d30aa033547..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_display_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft Devices - :vartype provider: str - :ivar resource: Resource Type: IotHubs - :vartype resource: str - :ivar operation: Name of the operation - :vartype operation: str - :ivar description: Description of the operation - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None - self.description = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs.py deleted file mode 100644 index 206391142c95..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationInputs(Model): - """Input values. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the IoT hub to check. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationInputs, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs_py3.py deleted file mode 100644 index 9fc6f5468506..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_inputs_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class OperationInputs(Model): - """Input values. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the IoT hub to check. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, **kwargs) -> None: - super(OperationInputs, self).__init__(**kwargs) - self.name = name diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_paged.py deleted file mode 100644 index 3b8a1df408c9..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_py3.py deleted file mode 100644 index 9915ab12b45e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/operation_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Operation(Model): - """IoT Hub REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{read | write | action | - delete} - :vartype name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.iothub.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = display diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics.py deleted file mode 100644 index fc9d0e72cb40..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistryStatistics(Model): - """Identity registry statistics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar total_device_count: The total count of devices in the identity - registry. - :vartype total_device_count: long - :ivar enabled_device_count: The count of enabled devices in the identity - registry. - :vartype enabled_device_count: long - :ivar disabled_device_count: The count of disabled devices in the identity - registry. - :vartype disabled_device_count: long - """ - - _validation = { - 'total_device_count': {'readonly': True}, - 'enabled_device_count': {'readonly': True}, - 'disabled_device_count': {'readonly': True}, - } - - _attribute_map = { - 'total_device_count': {'key': 'totalDeviceCount', 'type': 'long'}, - 'enabled_device_count': {'key': 'enabledDeviceCount', 'type': 'long'}, - 'disabled_device_count': {'key': 'disabledDeviceCount', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(RegistryStatistics, self).__init__(**kwargs) - self.total_device_count = None - self.enabled_device_count = None - self.disabled_device_count = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics_py3.py deleted file mode 100644 index 7607caca6707..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/registry_statistics_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RegistryStatistics(Model): - """Identity registry statistics. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar total_device_count: The total count of devices in the identity - registry. - :vartype total_device_count: long - :ivar enabled_device_count: The count of enabled devices in the identity - registry. - :vartype enabled_device_count: long - :ivar disabled_device_count: The count of disabled devices in the identity - registry. - :vartype disabled_device_count: long - """ - - _validation = { - 'total_device_count': {'readonly': True}, - 'enabled_device_count': {'readonly': True}, - 'disabled_device_count': {'readonly': True}, - } - - _attribute_map = { - 'total_device_count': {'key': 'totalDeviceCount', 'type': 'long'}, - 'enabled_device_count': {'key': 'enabledDeviceCount', 'type': 'long'}, - 'disabled_device_count': {'key': 'disabledDeviceCount', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(RegistryStatistics, self).__init__(**kwargs) - self.total_device_count = None - self.enabled_device_count = None - self.disabled_device_count = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource.py deleted file mode 100644 index e03d78711115..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The common properties of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource_py3.py deleted file mode 100644 index 436710184586..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/resource_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Resource(Model): - """The common properties of an Azure resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error.py deleted file mode 100644 index c11e230581d6..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteCompilationError(Model): - """Compilation error when evaluating route. - - :param message: Route error message - :type message: str - :param severity: Severity of the route error. Possible values include: - 'error', 'warning' - :type severity: str or ~azure.mgmt.iothub.models.RouteErrorSeverity - :param location: Location where the route error happened - :type location: ~azure.mgmt.iothub.models.RouteErrorRange - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'RouteErrorRange'}, - } - - def __init__(self, **kwargs): - super(RouteCompilationError, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.severity = kwargs.get('severity', None) - self.location = kwargs.get('location', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error_py3.py deleted file mode 100644 index f179c58b5f91..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_compilation_error_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteCompilationError(Model): - """Compilation error when evaluating route. - - :param message: Route error message - :type message: str - :param severity: Severity of the route error. Possible values include: - 'error', 'warning' - :type severity: str or ~azure.mgmt.iothub.models.RouteErrorSeverity - :param location: Location where the route error happened - :type location: ~azure.mgmt.iothub.models.RouteErrorRange - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'RouteErrorRange'}, - } - - def __init__(self, *, message: str=None, severity=None, location=None, **kwargs) -> None: - super(RouteCompilationError, self).__init__(**kwargs) - self.message = message - self.severity = severity - self.location = location diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position.py deleted file mode 100644 index 5c2c05a70195..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteErrorPosition(Model): - """Position where the route error happened. - - :param line: Line where the route error happened - :type line: int - :param column: Column where the route error happened - :type column: int - """ - - _attribute_map = { - 'line': {'key': 'line', 'type': 'int'}, - 'column': {'key': 'column', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RouteErrorPosition, self).__init__(**kwargs) - self.line = kwargs.get('line', None) - self.column = kwargs.get('column', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position_py3.py deleted file mode 100644 index a8d6b7c139bf..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_position_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteErrorPosition(Model): - """Position where the route error happened. - - :param line: Line where the route error happened - :type line: int - :param column: Column where the route error happened - :type column: int - """ - - _attribute_map = { - 'line': {'key': 'line', 'type': 'int'}, - 'column': {'key': 'column', 'type': 'int'}, - } - - def __init__(self, *, line: int=None, column: int=None, **kwargs) -> None: - super(RouteErrorPosition, self).__init__(**kwargs) - self.line = line - self.column = column diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range.py deleted file mode 100644 index 2bc28d2281f6..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteErrorRange(Model): - """Range of route errors. - - :param start: Start where the route error happened - :type start: ~azure.mgmt.iothub.models.RouteErrorPosition - :param end: End where the route error happened - :type end: ~azure.mgmt.iothub.models.RouteErrorPosition - """ - - _attribute_map = { - 'start': {'key': 'start', 'type': 'RouteErrorPosition'}, - 'end': {'key': 'end', 'type': 'RouteErrorPosition'}, - } - - def __init__(self, **kwargs): - super(RouteErrorRange, self).__init__(**kwargs) - self.start = kwargs.get('start', None) - self.end = kwargs.get('end', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range_py3.py deleted file mode 100644 index bcafcaa32fa4..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_error_range_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteErrorRange(Model): - """Range of route errors. - - :param start: Start where the route error happened - :type start: ~azure.mgmt.iothub.models.RouteErrorPosition - :param end: End where the route error happened - :type end: ~azure.mgmt.iothub.models.RouteErrorPosition - """ - - _attribute_map = { - 'start': {'key': 'start', 'type': 'RouteErrorPosition'}, - 'end': {'key': 'end', 'type': 'RouteErrorPosition'}, - } - - def __init__(self, *, start=None, end=None, **kwargs) -> None: - super(RouteErrorRange, self).__init__(**kwargs) - self.start = start - self.end = end diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties.py deleted file mode 100644 index cb23780b6f71..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteProperties(Model): - """The properties of a routing rule that your IoT hub uses to route messages - to endpoints. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the route. The name can only include - alphanumeric characters, periods, underscores, hyphens, has a maximum - length of 64 characters, and must be unique. - :type name: str - :param source: Required. The source that the routing rule is to be applied - to, such as DeviceMessages. Possible values include: 'Invalid', - 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - 'DeviceJobLifecycleEvents' - :type source: str or ~azure.mgmt.iothub.models.RoutingSource - :param condition: The condition that is evaluated to apply the routing - rule. If no condition is provided, it evaluates to true by default. For - grammar, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language - :type condition: str - :param endpoint_names: Required. The list of endpoints to which messages - that satisfy the condition are routed. Currently only one endpoint is - allowed. - :type endpoint_names: list[str] - :param is_enabled: Required. Used to specify whether a route is enabled. - :type is_enabled: bool - """ - - _validation = { - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - 'source': {'required': True}, - 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, - 'is_enabled': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'condition': {'key': 'condition', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(RouteProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.source = kwargs.get('source', None) - self.condition = kwargs.get('condition', None) - self.endpoint_names = kwargs.get('endpoint_names', None) - self.is_enabled = kwargs.get('is_enabled', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties_py3.py deleted file mode 100644 index a913d4880714..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/route_properties_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RouteProperties(Model): - """The properties of a routing rule that your IoT hub uses to route messages - to endpoints. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the route. The name can only include - alphanumeric characters, periods, underscores, hyphens, has a maximum - length of 64 characters, and must be unique. - :type name: str - :param source: Required. The source that the routing rule is to be applied - to, such as DeviceMessages. Possible values include: 'Invalid', - 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - 'DeviceJobLifecycleEvents' - :type source: str or ~azure.mgmt.iothub.models.RoutingSource - :param condition: The condition that is evaluated to apply the routing - rule. If no condition is provided, it evaluates to true by default. For - grammar, see: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language - :type condition: str - :param endpoint_names: Required. The list of endpoints to which messages - that satisfy the condition are routed. Currently only one endpoint is - allowed. - :type endpoint_names: list[str] - :param is_enabled: Required. Used to specify whether a route is enabled. - :type is_enabled: bool - """ - - _validation = { - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - 'source': {'required': True}, - 'endpoint_names': {'required': True, 'max_items': 1, 'min_items': 1}, - 'is_enabled': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'condition': {'key': 'condition', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - } - - def __init__(self, *, name: str, source, endpoint_names, is_enabled: bool, condition: str=None, **kwargs) -> None: - super(RouteProperties, self).__init__(**kwargs) - self.name = name - self.source = source - self.condition = condition - self.endpoint_names = endpoint_names - self.is_enabled = is_enabled diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints.py deleted file mode 100644 index cdd1114e883a..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingEndpoints(Model): - """The properties related to the custom endpoints to which your IoT hub routes - messages based on the routing rules. A maximum of 10 custom endpoints are - allowed across all endpoint types for paid hubs and only 1 custom endpoint - is allowed across all endpoint types for free hubs. - - :param service_bus_queues: The list of Service Bus queue endpoints that - IoT hub routes the messages to, based on the routing rules. - :type service_bus_queues: - list[~azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties] - :param service_bus_topics: The list of Service Bus topic endpoints that - the IoT hub routes the messages to, based on the routing rules. - :type service_bus_topics: - list[~azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties] - :param event_hubs: The list of Event Hubs endpoints that IoT hub routes - messages to, based on the routing rules. This list does not include the - built-in Event Hubs endpoint. - :type event_hubs: - list[~azure.mgmt.iothub.models.RoutingEventHubProperties] - :param storage_containers: The list of storage container endpoints that - IoT hub routes messages to, based on the routing rules. - :type storage_containers: - list[~azure.mgmt.iothub.models.RoutingStorageContainerProperties] - """ - - _attribute_map = { - 'service_bus_queues': {'key': 'serviceBusQueues', 'type': '[RoutingServiceBusQueueEndpointProperties]'}, - 'service_bus_topics': {'key': 'serviceBusTopics', 'type': '[RoutingServiceBusTopicEndpointProperties]'}, - 'event_hubs': {'key': 'eventHubs', 'type': '[RoutingEventHubProperties]'}, - 'storage_containers': {'key': 'storageContainers', 'type': '[RoutingStorageContainerProperties]'}, - } - - def __init__(self, **kwargs): - super(RoutingEndpoints, self).__init__(**kwargs) - self.service_bus_queues = kwargs.get('service_bus_queues', None) - self.service_bus_topics = kwargs.get('service_bus_topics', None) - self.event_hubs = kwargs.get('event_hubs', None) - self.storage_containers = kwargs.get('storage_containers', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints_py3.py deleted file mode 100644 index 518e57b44b16..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_endpoints_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingEndpoints(Model): - """The properties related to the custom endpoints to which your IoT hub routes - messages based on the routing rules. A maximum of 10 custom endpoints are - allowed across all endpoint types for paid hubs and only 1 custom endpoint - is allowed across all endpoint types for free hubs. - - :param service_bus_queues: The list of Service Bus queue endpoints that - IoT hub routes the messages to, based on the routing rules. - :type service_bus_queues: - list[~azure.mgmt.iothub.models.RoutingServiceBusQueueEndpointProperties] - :param service_bus_topics: The list of Service Bus topic endpoints that - the IoT hub routes the messages to, based on the routing rules. - :type service_bus_topics: - list[~azure.mgmt.iothub.models.RoutingServiceBusTopicEndpointProperties] - :param event_hubs: The list of Event Hubs endpoints that IoT hub routes - messages to, based on the routing rules. This list does not include the - built-in Event Hubs endpoint. - :type event_hubs: - list[~azure.mgmt.iothub.models.RoutingEventHubProperties] - :param storage_containers: The list of storage container endpoints that - IoT hub routes messages to, based on the routing rules. - :type storage_containers: - list[~azure.mgmt.iothub.models.RoutingStorageContainerProperties] - """ - - _attribute_map = { - 'service_bus_queues': {'key': 'serviceBusQueues', 'type': '[RoutingServiceBusQueueEndpointProperties]'}, - 'service_bus_topics': {'key': 'serviceBusTopics', 'type': '[RoutingServiceBusTopicEndpointProperties]'}, - 'event_hubs': {'key': 'eventHubs', 'type': '[RoutingEventHubProperties]'}, - 'storage_containers': {'key': 'storageContainers', 'type': '[RoutingStorageContainerProperties]'}, - } - - def __init__(self, *, service_bus_queues=None, service_bus_topics=None, event_hubs=None, storage_containers=None, **kwargs) -> None: - super(RoutingEndpoints, self).__init__(**kwargs) - self.service_bus_queues = service_bus_queues - self.service_bus_topics = service_bus_topics - self.event_hubs = event_hubs - self.storage_containers = storage_containers diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties.py deleted file mode 100644 index de61cf4cca85..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingEventHubProperties(Model): - """The properties related to an event hub endpoint. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the event hub - endpoint. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. - :type name: str - :param subscription_id: The subscription identifier of the event hub - endpoint. - :type subscription_id: str - :param resource_group: The name of the resource group of the event hub - endpoint. - :type resource_group: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RoutingEventHubProperties, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.name = kwargs.get('name', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties_py3.py deleted file mode 100644 index 28029340935e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_event_hub_properties_py3.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingEventHubProperties(Model): - """The properties related to an event hub endpoint. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the event hub - endpoint. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. - :type name: str - :param subscription_id: The subscription identifier of the event hub - endpoint. - :type subscription_id: str - :param resource_group: The name of the resource group of the event hub - endpoint. - :type resource_group: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, name: str, subscription_id: str=None, resource_group: str=None, **kwargs) -> None: - super(RoutingEventHubProperties, self).__init__(**kwargs) - self.connection_string = connection_string - self.name = name - self.subscription_id = subscription_id - self.resource_group = resource_group diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message.py deleted file mode 100644 index 542d091cd9d5..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingMessage(Model): - """Routing message. - - :param body: Body of routing message - :type body: str - :param app_properties: App properties - :type app_properties: dict[str, str] - :param system_properties: System properties - :type system_properties: dict[str, str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'str'}, - 'app_properties': {'key': 'appProperties', 'type': '{str}'}, - 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(RoutingMessage, self).__init__(**kwargs) - self.body = kwargs.get('body', None) - self.app_properties = kwargs.get('app_properties', None) - self.system_properties = kwargs.get('system_properties', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message_py3.py deleted file mode 100644 index 049f4a5a427b..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_message_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingMessage(Model): - """Routing message. - - :param body: Body of routing message - :type body: str - :param app_properties: App properties - :type app_properties: dict[str, str] - :param system_properties: System properties - :type system_properties: dict[str, str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'str'}, - 'app_properties': {'key': 'appProperties', 'type': '{str}'}, - 'system_properties': {'key': 'systemProperties', 'type': '{str}'}, - } - - def __init__(self, *, body: str=None, app_properties=None, system_properties=None, **kwargs) -> None: - super(RoutingMessage, self).__init__(**kwargs) - self.body = body - self.app_properties = app_properties - self.system_properties = system_properties diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties.py deleted file mode 100644 index 23ae743a28c4..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingProperties(Model): - """The routing related properties of the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging. - - :param endpoints: - :type endpoints: ~azure.mgmt.iothub.models.RoutingEndpoints - :param routes: The list of user-provided routing rules that the IoT hub - uses to route messages to built-in and custom endpoints. A maximum of 100 - routing rules are allowed for paid hubs and a maximum of 5 routing rules - are allowed for free hubs. - :type routes: list[~azure.mgmt.iothub.models.RouteProperties] - :param fallback_route: The properties of the route that is used as a - fall-back route when none of the conditions specified in the 'routes' - section are met. This is an optional parameter. When this property is not - set, the messages which do not meet any of the conditions specified in the - 'routes' section get routed to the built-in eventhub endpoint. - :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties - :param enrichments: The list of user-provided enrichments that the IoT hub - applies to messages to be delivered to built-in and custom endpoints. See: - https://aka.ms/iotmsgenrich - :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] - """ - - _attribute_map = { - 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, - 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, - 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, - 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, - } - - def __init__(self, **kwargs): - super(RoutingProperties, self).__init__(**kwargs) - self.endpoints = kwargs.get('endpoints', None) - self.routes = kwargs.get('routes', None) - self.fallback_route = kwargs.get('fallback_route', None) - self.enrichments = kwargs.get('enrichments', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties_py3.py deleted file mode 100644 index fdde758a305c..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_properties_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingProperties(Model): - """The routing related properties of the IoT hub. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging. - - :param endpoints: - :type endpoints: ~azure.mgmt.iothub.models.RoutingEndpoints - :param routes: The list of user-provided routing rules that the IoT hub - uses to route messages to built-in and custom endpoints. A maximum of 100 - routing rules are allowed for paid hubs and a maximum of 5 routing rules - are allowed for free hubs. - :type routes: list[~azure.mgmt.iothub.models.RouteProperties] - :param fallback_route: The properties of the route that is used as a - fall-back route when none of the conditions specified in the 'routes' - section are met. This is an optional parameter. When this property is not - set, the messages which do not meet any of the conditions specified in the - 'routes' section get routed to the built-in eventhub endpoint. - :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties - :param enrichments: The list of user-provided enrichments that the IoT hub - applies to messages to be delivered to built-in and custom endpoints. See: - https://aka.ms/iotmsgenrich - :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] - """ - - _attribute_map = { - 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, - 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, - 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, - 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, - } - - def __init__(self, *, endpoints=None, routes=None, fallback_route=None, enrichments=None, **kwargs) -> None: - super(RoutingProperties, self).__init__(**kwargs) - self.endpoints = endpoints - self.routes = routes - self.fallback_route = fallback_route - self.enrichments = enrichments diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties.py deleted file mode 100644 index 6aa29a456714..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingServiceBusQueueEndpointProperties(Model): - """The properties related to service bus queue endpoint types. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the service - bus queue endpoint. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. The name need not be the same as the actual - queue name. - :type name: str - :param subscription_id: The subscription identifier of the service bus - queue endpoint. - :type subscription_id: str - :param resource_group: The name of the resource group of the service bus - queue endpoint. - :type resource_group: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RoutingServiceBusQueueEndpointProperties, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.name = kwargs.get('name', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties_py3.py deleted file mode 100644 index fdd7aeffa58d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_queue_endpoint_properties_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingServiceBusQueueEndpointProperties(Model): - """The properties related to service bus queue endpoint types. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the service - bus queue endpoint. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. The name need not be the same as the actual - queue name. - :type name: str - :param subscription_id: The subscription identifier of the service bus - queue endpoint. - :type subscription_id: str - :param resource_group: The name of the resource group of the service bus - queue endpoint. - :type resource_group: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, name: str, subscription_id: str=None, resource_group: str=None, **kwargs) -> None: - super(RoutingServiceBusQueueEndpointProperties, self).__init__(**kwargs) - self.connection_string = connection_string - self.name = name - self.subscription_id = subscription_id - self.resource_group = resource_group diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties.py deleted file mode 100644 index fb171d9549c0..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingServiceBusTopicEndpointProperties(Model): - """The properties related to service bus topic endpoint types. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the service - bus topic endpoint. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. The name need not be the same as the actual - topic name. - :type name: str - :param subscription_id: The subscription identifier of the service bus - topic endpoint. - :type subscription_id: str - :param resource_group: The name of the resource group of the service bus - topic endpoint. - :type resource_group: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RoutingServiceBusTopicEndpointProperties, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.name = kwargs.get('name', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties_py3.py deleted file mode 100644 index 11722e951025..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_service_bus_topic_endpoint_properties_py3.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingServiceBusTopicEndpointProperties(Model): - """The properties related to service bus topic endpoint types. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the service - bus topic endpoint. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. The name need not be the same as the actual - topic name. - :type name: str - :param subscription_id: The subscription identifier of the service bus - topic endpoint. - :type subscription_id: str - :param resource_group: The name of the resource group of the service bus - topic endpoint. - :type resource_group: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, name: str, subscription_id: str=None, resource_group: str=None, **kwargs) -> None: - super(RoutingServiceBusTopicEndpointProperties, self).__init__(**kwargs) - self.connection_string = connection_string - self.name = name - self.subscription_id = subscription_id - self.resource_group = resource_group diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties.py deleted file mode 100644 index 094d6e27f0b2..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingStorageContainerProperties(Model): - """The properties related to a storage container endpoint. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the storage - account. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. - :type name: str - :param subscription_id: The subscription identifier of the storage - account. - :type subscription_id: str - :param resource_group: The name of the resource group of the storage - account. - :type resource_group: str - :param container_name: Required. The name of storage container in the - storage account. - :type container_name: str - :param file_name_format: File name format for the blob. Default format is - {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are - mandatory but can be reordered. - :type file_name_format: str - :param batch_frequency_in_seconds: Time interval at which blobs are - written to storage. Value should be between 60 and 720 seconds. Default - value is 300 seconds. - :type batch_frequency_in_seconds: int - :param max_chunk_size_in_bytes: Maximum number of bytes for each blob - written to storage. Value should be between 10485760(10MB) and - 524288000(500MB). Default value is 314572800(300MB). - :type max_chunk_size_in_bytes: int - :param encoding: Encoding that is used to serialize messages to blobs. - Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is - 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON' - :type encoding: str or ~azure.mgmt.iothub.models.enum - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - 'container_name': {'required': True}, - 'batch_frequency_in_seconds': {'maximum': 720, 'minimum': 60}, - 'max_chunk_size_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'file_name_format': {'key': 'fileNameFormat', 'type': 'str'}, - 'batch_frequency_in_seconds': {'key': 'batchFrequencyInSeconds', 'type': 'int'}, - 'max_chunk_size_in_bytes': {'key': 'maxChunkSizeInBytes', 'type': 'int'}, - 'encoding': {'key': 'encoding', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RoutingStorageContainerProperties, self).__init__(**kwargs) - self.connection_string = kwargs.get('connection_string', None) - self.name = kwargs.get('name', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.container_name = kwargs.get('container_name', None) - self.file_name_format = kwargs.get('file_name_format', None) - self.batch_frequency_in_seconds = kwargs.get('batch_frequency_in_seconds', None) - self.max_chunk_size_in_bytes = kwargs.get('max_chunk_size_in_bytes', None) - self.encoding = kwargs.get('encoding', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties_py3.py deleted file mode 100644 index 232ce49b5f5d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_storage_container_properties_py3.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingStorageContainerProperties(Model): - """The properties related to a storage container endpoint. - - All required parameters must be populated in order to send to Azure. - - :param connection_string: Required. The connection string of the storage - account. - :type connection_string: str - :param name: Required. The name that identifies this endpoint. The name - can only include alphanumeric characters, periods, underscores, hyphens - and has a maximum length of 64 characters. The following names are - reserved: events, fileNotifications, $default. Endpoint names must be - unique across endpoint types. - :type name: str - :param subscription_id: The subscription identifier of the storage - account. - :type subscription_id: str - :param resource_group: The name of the resource group of the storage - account. - :type resource_group: str - :param container_name: Required. The name of storage container in the - storage account. - :type container_name: str - :param file_name_format: File name format for the blob. Default format is - {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are - mandatory but can be reordered. - :type file_name_format: str - :param batch_frequency_in_seconds: Time interval at which blobs are - written to storage. Value should be between 60 and 720 seconds. Default - value is 300 seconds. - :type batch_frequency_in_seconds: int - :param max_chunk_size_in_bytes: Maximum number of bytes for each blob - written to storage. Value should be between 10485760(10MB) and - 524288000(500MB). Default value is 314572800(300MB). - :type max_chunk_size_in_bytes: int - :param encoding: Encoding that is used to serialize messages to blobs. - Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is - 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON' - :type encoding: str or ~azure.mgmt.iothub.models.enum - """ - - _validation = { - 'connection_string': {'required': True}, - 'name': {'required': True, 'pattern': r'^[A-Za-z0-9-._]{1,64}$'}, - 'container_name': {'required': True}, - 'batch_frequency_in_seconds': {'maximum': 720, 'minimum': 60}, - 'max_chunk_size_in_bytes': {'maximum': 524288000, 'minimum': 10485760}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'file_name_format': {'key': 'fileNameFormat', 'type': 'str'}, - 'batch_frequency_in_seconds': {'key': 'batchFrequencyInSeconds', 'type': 'int'}, - 'max_chunk_size_in_bytes': {'key': 'maxChunkSizeInBytes', 'type': 'int'}, - 'encoding': {'key': 'encoding', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, name: str, container_name: str, subscription_id: str=None, resource_group: str=None, file_name_format: str=None, batch_frequency_in_seconds: int=None, max_chunk_size_in_bytes: int=None, encoding=None, **kwargs) -> None: - super(RoutingStorageContainerProperties, self).__init__(**kwargs) - self.connection_string = connection_string - self.name = name - self.subscription_id = subscription_id - self.resource_group = resource_group - self.container_name = container_name - self.file_name_format = file_name_format - self.batch_frequency_in_seconds = batch_frequency_in_seconds - self.max_chunk_size_in_bytes = max_chunk_size_in_bytes - self.encoding = encoding diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin.py deleted file mode 100644 index e2405ca5f721..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingTwin(Model): - """Twin reference input parameter. This is an optional parameter. - - :param tags: Twin Tags - :type tags: object - :param properties: - :type properties: ~azure.mgmt.iothub.models.RoutingTwinProperties - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': 'RoutingTwinProperties'}, - } - - def __init__(self, **kwargs): - super(RoutingTwin, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties.py deleted file mode 100644 index dca08414ddf2..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingTwinProperties(Model): - """RoutingTwinProperties. - - :param desired: Twin desired properties - :type desired: object - :param reported: Twin desired properties - :type reported: object - """ - - _attribute_map = { - 'desired': {'key': 'desired', 'type': 'object'}, - 'reported': {'key': 'reported', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(RoutingTwinProperties, self).__init__(**kwargs) - self.desired = kwargs.get('desired', None) - self.reported = kwargs.get('reported', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties_py3.py deleted file mode 100644 index 9e77dccafaeb..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_properties_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingTwinProperties(Model): - """RoutingTwinProperties. - - :param desired: Twin desired properties - :type desired: object - :param reported: Twin desired properties - :type reported: object - """ - - _attribute_map = { - 'desired': {'key': 'desired', 'type': 'object'}, - 'reported': {'key': 'reported', 'type': 'object'}, - } - - def __init__(self, *, desired=None, reported=None, **kwargs) -> None: - super(RoutingTwinProperties, self).__init__(**kwargs) - self.desired = desired - self.reported = reported diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_py3.py deleted file mode 100644 index 0badfbc7e89e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/routing_twin_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class RoutingTwin(Model): - """Twin reference input parameter. This is an optional parameter. - - :param tags: Twin Tags - :type tags: object - :param properties: - :type properties: ~azure.mgmt.iothub.models.RoutingTwinProperties - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': 'object'}, - 'properties': {'key': 'properties', 'type': 'RoutingTwinProperties'}, - } - - def __init__(self, *, tags=None, properties=None, **kwargs) -> None: - super(RoutingTwin, self).__init__(**kwargs) - self.tags = tags - self.properties = properties diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule.py deleted file mode 100644 index be54ad8ab717..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedAccessSignatureAuthorizationRule(Model): - """The properties of an IoT hub shared access policy. - - All required parameters must be populated in order to send to Azure. - - :param key_name: Required. The name of the shared access policy. - :type key_name: str - :param primary_key: The primary key. - :type primary_key: str - :param secondary_key: The secondary key. - :type secondary_key: str - :param rights: Required. The permissions assigned to the shared access - policy. Possible values include: 'RegistryRead', 'RegistryWrite', - 'ServiceConnect', 'DeviceConnect', 'RegistryRead, RegistryWrite', - 'RegistryRead, ServiceConnect', 'RegistryRead, DeviceConnect', - 'RegistryWrite, ServiceConnect', 'RegistryWrite, DeviceConnect', - 'ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, - ServiceConnect', 'RegistryRead, RegistryWrite, DeviceConnect', - 'RegistryRead, ServiceConnect, DeviceConnect', 'RegistryWrite, - ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, - ServiceConnect, DeviceConnect' - :type rights: str or ~azure.mgmt.iothub.models.AccessRights - """ - - _validation = { - 'key_name': {'required': True}, - 'rights': {'required': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'rights': {'key': 'rights', 'type': 'AccessRights'}, - } - - def __init__(self, **kwargs): - super(SharedAccessSignatureAuthorizationRule, self).__init__(**kwargs) - self.key_name = kwargs.get('key_name', None) - self.primary_key = kwargs.get('primary_key', None) - self.secondary_key = kwargs.get('secondary_key', None) - self.rights = kwargs.get('rights', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_paged.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_paged.py deleted file mode 100644 index 72971de285e6..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class SharedAccessSignatureAuthorizationRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`SharedAccessSignatureAuthorizationRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SharedAccessSignatureAuthorizationRule]'} - } - - def __init__(self, *args, **kwargs): - - super(SharedAccessSignatureAuthorizationRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_py3.py deleted file mode 100644 index e65028a6ec16..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/shared_access_signature_authorization_rule_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class SharedAccessSignatureAuthorizationRule(Model): - """The properties of an IoT hub shared access policy. - - All required parameters must be populated in order to send to Azure. - - :param key_name: Required. The name of the shared access policy. - :type key_name: str - :param primary_key: The primary key. - :type primary_key: str - :param secondary_key: The secondary key. - :type secondary_key: str - :param rights: Required. The permissions assigned to the shared access - policy. Possible values include: 'RegistryRead', 'RegistryWrite', - 'ServiceConnect', 'DeviceConnect', 'RegistryRead, RegistryWrite', - 'RegistryRead, ServiceConnect', 'RegistryRead, DeviceConnect', - 'RegistryWrite, ServiceConnect', 'RegistryWrite, DeviceConnect', - 'ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, - ServiceConnect', 'RegistryRead, RegistryWrite, DeviceConnect', - 'RegistryRead, ServiceConnect, DeviceConnect', 'RegistryWrite, - ServiceConnect, DeviceConnect', 'RegistryRead, RegistryWrite, - ServiceConnect, DeviceConnect' - :type rights: str or ~azure.mgmt.iothub.models.AccessRights - """ - - _validation = { - 'key_name': {'required': True}, - 'rights': {'required': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'rights': {'key': 'rights', 'type': 'AccessRights'}, - } - - def __init__(self, *, key_name: str, rights, primary_key: str=None, secondary_key: str=None, **kwargs) -> None: - super(SharedAccessSignatureAuthorizationRule, self).__init__(**kwargs) - self.key_name = key_name - self.primary_key = primary_key - self.secondary_key = secondary_key - self.rights = rights diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties.py deleted file mode 100644 index c7d89dd13b2b..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageEndpointProperties(Model): - """The properties of the Azure Storage endpoint for file upload. - - All required parameters must be populated in order to send to Azure. - - :param sas_ttl_as_iso8601: The period of time for which the SAS URI - generated by IoT Hub for file upload is valid. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. - :type sas_ttl_as_iso8601: timedelta - :param connection_string: Required. The connection string for the Azure - Storage account to which files are uploaded. - :type connection_string: str - :param container_name: Required. The name of the root container where you - upload files. The container need not exist but should be creatable using - the connectionString specified. - :type container_name: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'sas_ttl_as_iso8601': {'key': 'sasTtlAsIso8601', 'type': 'duration'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageEndpointProperties, self).__init__(**kwargs) - self.sas_ttl_as_iso8601 = kwargs.get('sas_ttl_as_iso8601', None) - self.connection_string = kwargs.get('connection_string', None) - self.container_name = kwargs.get('container_name', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties_py3.py deleted file mode 100644 index 015e0488bd7b..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/storage_endpoint_properties_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class StorageEndpointProperties(Model): - """The properties of the Azure Storage endpoint for file upload. - - All required parameters must be populated in order to send to Azure. - - :param sas_ttl_as_iso8601: The period of time for which the SAS URI - generated by IoT Hub for file upload is valid. See: - https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options. - :type sas_ttl_as_iso8601: timedelta - :param connection_string: Required. The connection string for the Azure - Storage account to which files are uploaded. - :type connection_string: str - :param container_name: Required. The name of the root container where you - upload files. The container need not exist but should be creatable using - the connectionString specified. - :type container_name: str - """ - - _validation = { - 'connection_string': {'required': True}, - 'container_name': {'required': True}, - } - - _attribute_map = { - 'sas_ttl_as_iso8601': {'key': 'sasTtlAsIso8601', 'type': 'duration'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, container_name: str, sas_ttl_as_iso8601=None, **kwargs) -> None: - super(StorageEndpointProperties, self).__init__(**kwargs) - self.sas_ttl_as_iso8601 = sas_ttl_as_iso8601 - self.connection_string = connection_string - self.container_name = container_name diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource.py deleted file mode 100644 index 76bbf8349862..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsResource(Model): - """A container holding only the Tags for a resource, allowing the user to - update the tags on an IoT Hub instance. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource_py3.py deleted file mode 100644 index d7b8c492a731..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/tags_resource_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TagsResource(Model): - """A container holding only the Tags for a resource, allowing the user to - update the tags on an IoT Hub instance. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input.py deleted file mode 100644 index ac6820f6df5d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestAllRoutesInput(Model): - """Input for testing all routes. - - :param routing_source: Routing source. Possible values include: 'Invalid', - 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - 'DeviceJobLifecycleEvents' - :type routing_source: str or ~azure.mgmt.iothub.models.RoutingSource - :param message: Routing message - :type message: ~azure.mgmt.iothub.models.RoutingMessage - :param twin: Routing Twin Reference - :type twin: ~azure.mgmt.iothub.models.RoutingTwin - """ - - _attribute_map = { - 'routing_source': {'key': 'routingSource', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'RoutingMessage'}, - 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, - } - - def __init__(self, **kwargs): - super(TestAllRoutesInput, self).__init__(**kwargs) - self.routing_source = kwargs.get('routing_source', None) - self.message = kwargs.get('message', None) - self.twin = kwargs.get('twin', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input_py3.py deleted file mode 100644 index 17e18f80df1f..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_input_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestAllRoutesInput(Model): - """Input for testing all routes. - - :param routing_source: Routing source. Possible values include: 'Invalid', - 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - 'DeviceJobLifecycleEvents' - :type routing_source: str or ~azure.mgmt.iothub.models.RoutingSource - :param message: Routing message - :type message: ~azure.mgmt.iothub.models.RoutingMessage - :param twin: Routing Twin Reference - :type twin: ~azure.mgmt.iothub.models.RoutingTwin - """ - - _attribute_map = { - 'routing_source': {'key': 'routingSource', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'RoutingMessage'}, - 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, - } - - def __init__(self, *, routing_source=None, message=None, twin=None, **kwargs) -> None: - super(TestAllRoutesInput, self).__init__(**kwargs) - self.routing_source = routing_source - self.message = message - self.twin = twin diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result.py deleted file mode 100644 index 7d9488f8c551..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestAllRoutesResult(Model): - """Result of testing all routes. - - :param routes: JSON-serialized array of matched routes - :type routes: list[~azure.mgmt.iothub.models.MatchedRoute] - """ - - _attribute_map = { - 'routes': {'key': 'routes', 'type': '[MatchedRoute]'}, - } - - def __init__(self, **kwargs): - super(TestAllRoutesResult, self).__init__(**kwargs) - self.routes = kwargs.get('routes', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result_py3.py deleted file mode 100644 index da5c085f8e0a..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_all_routes_result_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestAllRoutesResult(Model): - """Result of testing all routes. - - :param routes: JSON-serialized array of matched routes - :type routes: list[~azure.mgmt.iothub.models.MatchedRoute] - """ - - _attribute_map = { - 'routes': {'key': 'routes', 'type': '[MatchedRoute]'}, - } - - def __init__(self, *, routes=None, **kwargs) -> None: - super(TestAllRoutesResult, self).__init__(**kwargs) - self.routes = routes diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input.py deleted file mode 100644 index 68fce8a3fcc2..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestRouteInput(Model): - """Input for testing route. - - All required parameters must be populated in order to send to Azure. - - :param message: Routing message - :type message: ~azure.mgmt.iothub.models.RoutingMessage - :param route: Required. Route properties - :type route: ~azure.mgmt.iothub.models.RouteProperties - :param twin: Routing Twin Reference - :type twin: ~azure.mgmt.iothub.models.RoutingTwin - """ - - _validation = { - 'route': {'required': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'RoutingMessage'}, - 'route': {'key': 'route', 'type': 'RouteProperties'}, - 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, - } - - def __init__(self, **kwargs): - super(TestRouteInput, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.route = kwargs.get('route', None) - self.twin = kwargs.get('twin', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input_py3.py deleted file mode 100644 index 65df810dfd73..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_input_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestRouteInput(Model): - """Input for testing route. - - All required parameters must be populated in order to send to Azure. - - :param message: Routing message - :type message: ~azure.mgmt.iothub.models.RoutingMessage - :param route: Required. Route properties - :type route: ~azure.mgmt.iothub.models.RouteProperties - :param twin: Routing Twin Reference - :type twin: ~azure.mgmt.iothub.models.RoutingTwin - """ - - _validation = { - 'route': {'required': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'RoutingMessage'}, - 'route': {'key': 'route', 'type': 'RouteProperties'}, - 'twin': {'key': 'twin', 'type': 'RoutingTwin'}, - } - - def __init__(self, *, route, message=None, twin=None, **kwargs) -> None: - super(TestRouteInput, self).__init__(**kwargs) - self.message = message - self.route = route - self.twin = twin diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result.py deleted file mode 100644 index 5c0ae7ff8f1d..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestRouteResult(Model): - """Result of testing one route. - - :param result: Result of testing route. Possible values include: - 'undefined', 'false', 'true' - :type result: str or ~azure.mgmt.iothub.models.TestResultStatus - :param details: Detailed result of testing route - :type details: ~azure.mgmt.iothub.models.TestRouteResultDetails - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'TestRouteResultDetails'}, - } - - def __init__(self, **kwargs): - super(TestRouteResult, self).__init__(**kwargs) - self.result = kwargs.get('result', None) - self.details = kwargs.get('details', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details.py deleted file mode 100644 index 53e3b99b6e8e..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestRouteResultDetails(Model): - """Detailed result of testing a route. - - :param compilation_errors: JSON-serialized list of route compilation - errors - :type compilation_errors: - list[~azure.mgmt.iothub.models.RouteCompilationError] - """ - - _attribute_map = { - 'compilation_errors': {'key': 'compilationErrors', 'type': '[RouteCompilationError]'}, - } - - def __init__(self, **kwargs): - super(TestRouteResultDetails, self).__init__(**kwargs) - self.compilation_errors = kwargs.get('compilation_errors', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details_py3.py deleted file mode 100644 index 6a1b850bb223..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_details_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestRouteResultDetails(Model): - """Detailed result of testing a route. - - :param compilation_errors: JSON-serialized list of route compilation - errors - :type compilation_errors: - list[~azure.mgmt.iothub.models.RouteCompilationError] - """ - - _attribute_map = { - 'compilation_errors': {'key': 'compilationErrors', 'type': '[RouteCompilationError]'}, - } - - def __init__(self, *, compilation_errors=None, **kwargs) -> None: - super(TestRouteResultDetails, self).__init__(**kwargs) - self.compilation_errors = compilation_errors diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_py3.py deleted file mode 100644 index 40bc12b3c63c..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/test_route_result_py3.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class TestRouteResult(Model): - """Result of testing one route. - - :param result: Result of testing route. Possible values include: - 'undefined', 'false', 'true' - :type result: str or ~azure.mgmt.iothub.models.TestResultStatus - :param details: Detailed result of testing route - :type details: ~azure.mgmt.iothub.models.TestRouteResultDetails - """ - - _attribute_map = { - 'result': {'key': 'result', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'TestRouteResultDetails'}, - } - - def __init__(self, *, result=None, details=None, **kwargs) -> None: - super(TestRouteResult, self).__init__(**kwargs) - self.result = result - self.details = details diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota.py deleted file mode 100644 index 5c5e474c74d4..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSubscriptionQuota(Model): - """User subscription quota response. - - :param id: IotHub type id - :type id: str - :param type: Response type - :type type: str - :param unit: Unit of IotHub type - :type unit: str - :param current_value: Current number of IotHub type - :type current_value: int - :param limit: Numerical limit on IotHub type - :type limit: int - :param name: IotHub type - :type name: ~azure.mgmt.iothub.models.Name - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'Name'}, - } - - def __init__(self, **kwargs): - super(UserSubscriptionQuota, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.type = kwargs.get('type', None) - self.unit = kwargs.get('unit', None) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result.py deleted file mode 100644 index 28595a1a5dbb..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSubscriptionQuotaListResult(Model): - """Json-serialized array of User subscription quota response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param value: - :type value: list[~azure.mgmt.iothub.models.UserSubscriptionQuota] - :ivar next_link: - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[UserSubscriptionQuota]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UserSubscriptionQuotaListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result_py3.py deleted file mode 100644 index 23ee4346bc48..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_list_result_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSubscriptionQuotaListResult(Model): - """Json-serialized array of User subscription quota response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param value: - :type value: list[~azure.mgmt.iothub.models.UserSubscriptionQuota] - :ivar next_link: - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[UserSubscriptionQuota]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(UserSubscriptionQuotaListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_py3.py deleted file mode 100644 index fb3011550948..000000000000 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/user_subscription_quota_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class UserSubscriptionQuota(Model): - """User subscription quota response. - - :param id: IotHub type id - :type id: str - :param type: Response type - :type type: str - :param unit: Unit of IotHub type - :type unit: str - :param current_value: Current number of IotHub type - :type current_value: int - :param limit: Numerical limit on IotHub type - :type limit: int - :param name: IotHub type - :type name: ~azure.mgmt.iothub.models.Name - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'int'}, - 'limit': {'key': 'limit', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'Name'}, - } - - def __init__(self, *, id: str=None, type: str=None, unit: str=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: - super(UserSubscriptionQuota, self).__init__(**kwargs) - self.id = id - self.type = type - self.unit = unit - self.current_value = current_value - self.limit = limit - self.name = name diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/__init__.py index e95609a34834..a30b3dc26f79 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/__init__.py @@ -9,11 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .iot_hub_resource_operations import IotHubResourceOperations -from .resource_provider_common_operations import ResourceProviderCommonOperations -from .certificates_operations import CertificatesOperations -from .iot_hub_operations import IotHubOperations +from ._operations import Operations +from ._iot_hub_resource_operations import IotHubResourceOperations +from ._resource_provider_common_operations import ResourceProviderCommonOperations +from ._certificates_operations import CertificatesOperations +from ._iot_hub_operations import IotHubOperations __all__ = [ 'Operations', diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/certificates_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py similarity index 99% rename from sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/certificates_operations.py rename to sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py index 50b3adffbc10..aaade9ffcdee 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/certificates_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py @@ -18,6 +18,8 @@ class CertificatesOperations(object): """CertificatesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -89,7 +91,6 @@ def list_by_iot_hub( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CertificateListDescription', response) @@ -156,7 +157,6 @@ def get( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CertificateDescription', response) @@ -237,7 +237,6 @@ def create_or_update( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CertificateDescription', response) if response.status_code == 201: @@ -373,7 +372,6 @@ def generate_verification_code( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CertificateWithNonceDescription', response) @@ -453,7 +451,6 @@ def verify( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CertificateDescription', response) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py similarity index 97% rename from sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/iot_hub_operations.py rename to sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py index 073723a53a72..30830c6175c9 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/iot_hub_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py @@ -20,6 +20,8 @@ class IotHubOperations(object): """IotHubOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/iot_hub_resource_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py similarity index 97% rename from sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/iot_hub_resource_operations.py rename to sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py index 28e8ff21971d..631ec6479d81 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/iot_hub_resource_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py @@ -21,6 +21,8 @@ class IotHubResourceOperations(object): """IotHubResourceOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -92,7 +94,6 @@ def get( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('IotHubDescription', response) @@ -436,8 +437,7 @@ def list_by_subscription( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -466,6 +466,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -474,12 +479,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.IotHubDescriptionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.IotHubDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.IotHubDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Devices/IotHubs'} @@ -504,8 +507,7 @@ def list_by_resource_group( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -535,6 +537,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -543,12 +550,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.IotHubDescriptionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.IotHubDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.IotHubDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs'} @@ -606,7 +611,6 @@ def get_stats( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RegistryStatistics', response) @@ -639,8 +643,7 @@ def get_valid_skus( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.get_valid_skus.metadata['url'] @@ -671,6 +674,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -679,12 +687,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.IotHubSkuDescriptionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.IotHubSkuDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.IotHubSkuDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_valid_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/skus'} @@ -716,8 +722,7 @@ def list_event_hub_consumer_groups( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_event_hub_consumer_groups.metadata['url'] @@ -749,6 +754,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -757,12 +767,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.EventHubConsumerGroupInfoPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.EventHubConsumerGroupInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.EventHubConsumerGroupInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_event_hub_consumer_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups'} @@ -829,7 +837,6 @@ def get_event_hub_consumer_group( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('EventHubConsumerGroupInfo', response) @@ -900,7 +907,6 @@ def create_event_hub_consumer_group( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('EventHubConsumerGroupInfo', response) @@ -999,8 +1005,7 @@ def list_jobs( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_jobs.metadata['url'] @@ -1031,6 +1036,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1039,12 +1049,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.JobResponsePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.JobResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.JobResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs'} @@ -1107,7 +1115,6 @@ def get_job( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobResponse', response) @@ -1140,8 +1147,7 @@ def get_quota_metrics( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.get_quota_metrics.metadata['url'] @@ -1172,6 +1178,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1180,12 +1191,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.IotHubQuotaMetricInfoPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.IotHubQuotaMetricInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.IotHubQuotaMetricInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_quota_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/quotaMetrics'} @@ -1211,8 +1220,7 @@ def get_endpoint_health( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.get_endpoint_health.metadata['url'] @@ -1243,6 +1251,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1251,12 +1264,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.EndpointHealthDataPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.EndpointHealthDataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.EndpointHealthDataPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized get_endpoint_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routingEndpointsHealth'} @@ -1315,7 +1326,6 @@ def check_name_availability( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('IotHubNameAvailabilityInfo', response) @@ -1384,7 +1394,6 @@ def test_all_routes( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TestAllRoutesResult', response) @@ -1453,7 +1462,6 @@ def test_route( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TestRouteResult', response) @@ -1489,8 +1497,7 @@ def list_keys( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_keys.metadata['url'] @@ -1521,6 +1528,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -1529,12 +1541,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SharedAccessSignatureAuthorizationRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SharedAccessSignatureAuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SharedAccessSignatureAuthorizationRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys'} @@ -1601,7 +1611,6 @@ def get_keys_for_key_name( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SharedAccessSignatureAuthorizationRule', response) @@ -1680,7 +1689,6 @@ def export_devices( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobResponse', response) @@ -1758,7 +1766,6 @@ def import_devices( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('JobResponse', response) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py similarity index 90% rename from sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/operations.py rename to sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py index ba7b4b76996b..e05cdc550f92 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py @@ -18,6 +18,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -85,12 +91,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Devices/operations'} diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/resource_provider_common_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py similarity index 96% rename from sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/resource_provider_common_operations.py rename to sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py index 73a256dda3a0..fe5f959b5b3c 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/resource_provider_common_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py @@ -18,6 +18,8 @@ class ResourceProviderCommonOperations(object): """ResourceProviderCommonOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -83,7 +85,6 @@ def get_subscription_quota( raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('UserSubscriptionQuotaListResult', response) diff --git a/sdk/iothub/azure-mgmt-iothub/setup.py b/sdk/iothub/azure-mgmt-iothub/setup.py index 2ace532e5ec9..0210ed0be72b 100644 --- a/sdk/iothub/azure-mgmt-iothub/setup.py +++ b/sdk/iothub/azure-mgmt-iothub/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From 3734f6c4dc78567fc4e403aefc39da613aa2b468 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 4 Sep 2019 18:35:15 -0700 Subject: [PATCH 2/8] [AutoPR iothub/resource-manager] [Hub Generated] Review request for Microsoft.Devices to add version stable/2019-03-22 (#6870) * Generated from 059a962abef25f7e4ef8ec8de9952be52cb56d14 adding locations property * Generated from 8ba1b37d546301bfa449e51717b855a2461b3ac2 Update specification/iothub/resource-manager/Microsoft.Devices/stable/2019-03-22/iothub.json Co-Authored-By: John Lian * Generated from 8ba1b37d546301bfa449e51717b855a2461b3ac2 Update specification/iothub/resource-manager/Microsoft.Devices/stable/2019-03-22/iothub.json Co-Authored-By: John Lian * Generated from 3ae1861609ea8cc0764ccc8d96e944294e18f072 Update specification/iothub/resource-manager/Microsoft.Devices/stable/2019-03-22/iothub.json Co-Authored-By: John Lian * Generated from bc9297416b01642c30b20a2531114a773269d870 Update specification/iothub/resource-manager/Microsoft.Devices/stable/2019-03-22/iothub.json Co-Authored-By: John Lian * Generated from f05eef4a3235f304777a2a1489423c6bb11335e9 Update iothub.json --- .../azure/mgmt/iothub/_iot_hub_client.py | 2 +- .../azure/mgmt/iothub/models/__init__.py | 6 -- .../azure/mgmt/iothub/models/_models.py | 68 ++---------------- .../azure/mgmt/iothub/models/_models_py3.py | 72 ++----------------- .../operations/_certificates_operations.py | 4 +- .../iothub/operations/_iot_hub_operations.py | 14 ++-- .../_iot_hub_resource_operations.py | 4 +- .../mgmt/iothub/operations/_operations.py | 4 +- .../_resource_provider_common_operations.py | 4 +- 9 files changed, 29 insertions(+), 149 deletions(-) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py index fbe07e66cddc..826978d02732 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py @@ -53,7 +53,7 @@ def __init__( super(IotHubClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-03-22-preview' + self.api_version = '2019-03-22' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py index 855c564865d3..f8f8179d170c 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py @@ -19,7 +19,6 @@ from ._models_py3 import CertificateWithNonceDescription from ._models_py3 import CloudToDeviceProperties from ._models_py3 import EndpointHealthData - from ._models_py3 import EnrichmentProperties from ._models_py3 import ErrorDetails, ErrorDetailsException from ._models_py3 import EventHubConsumerGroupInfo from ._models_py3 import EventHubProperties @@ -33,7 +32,6 @@ from ._models_py3 import IotHubLocationDescription from ._models_py3 import IotHubNameAvailabilityInfo from ._models_py3 import IotHubProperties - from ._models_py3 import IotHubPropertiesDeviceStreams from ._models_py3 import IotHubQuotaMetricInfo from ._models_py3 import IotHubSkuDescription from ._models_py3 import IotHubSkuInfo @@ -80,7 +78,6 @@ from ._models import CertificateWithNonceDescription from ._models import CloudToDeviceProperties from ._models import EndpointHealthData - from ._models import EnrichmentProperties from ._models import ErrorDetails, ErrorDetailsException from ._models import EventHubConsumerGroupInfo from ._models import EventHubProperties @@ -94,7 +91,6 @@ from ._models import IotHubLocationDescription from ._models import IotHubNameAvailabilityInfo from ._models import IotHubProperties - from ._models import IotHubPropertiesDeviceStreams from ._models import IotHubQuotaMetricInfo from ._models import IotHubSkuDescription from ._models import IotHubSkuInfo @@ -166,7 +162,6 @@ 'CertificateWithNonceDescription', 'CloudToDeviceProperties', 'EndpointHealthData', - 'EnrichmentProperties', 'ErrorDetails', 'ErrorDetailsException', 'EventHubConsumerGroupInfo', 'EventHubProperties', @@ -180,7 +175,6 @@ 'IotHubLocationDescription', 'IotHubNameAvailabilityInfo', 'IotHubProperties', - 'IotHubPropertiesDeviceStreams', 'IotHubQuotaMetricInfo', 'IotHubSkuDescription', 'IotHubSkuInfo', diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py index 19da905a3803..1fc6535253fa 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py @@ -330,40 +330,6 @@ def __init__(self, **kwargs): self.health_status = kwargs.get('health_status', None) -class EnrichmentProperties(Model): - """The properties of an enrichment that your IoT hub applies to messages - delivered to endpoints. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key or name for the enrichment property. - :type key: str - :param value: Required. The value for the enrichment property. - :type value: str - :param endpoint_names: Required. The list of endpoints for which the - enrichment is applied to the message. - :type endpoint_names: list[str] - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - 'endpoint_names': {'required': True, 'min_items': 1}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(EnrichmentProperties, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.value = kwargs.get('value', None) - self.endpoint_names = kwargs.get('endpoint_names', None) - - class ErrorDetails(Model): """Error details. @@ -811,9 +777,12 @@ class IotHubLocationDescription(Model): """Public representation of one of the locations where a resource is provisioned. - :param location: Azure Geo Regions + :param location: The name of the Azure region :type location: str - :param role: Specific Role assigned to this location. Possible values + :param role: The role of the region, can be either primary or secondary. + The primary region is where the IoT hub is currently provisioned. The + secondary region is the the Azure disaster recovery (DR) paired region and + also the region where the IoT hub can failover to. Possible values include: 'primary', 'secondary' :type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType """ @@ -909,9 +878,6 @@ class IotHubProperties(Model): :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties :param comments: IoT hub comments. :type comments: str - :param device_streams: The device streams properties of iothub. - :type device_streams: - ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams :param features: The capabilities and features enabled for the IoT hub. Possible values include: 'None', 'DeviceManagement' :type features: str or ~azure.mgmt.iothub.models.Capabilities @@ -940,7 +906,6 @@ class IotHubProperties(Model): 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, 'comments': {'key': 'comments', 'type': 'str'}, - 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, 'features': {'key': 'features', 'type': 'str'}, 'locations': {'key': 'locations', 'type': '[IotHubLocationDescription]'}, } @@ -959,27 +924,10 @@ def __init__(self, **kwargs): self.enable_file_upload_notifications = kwargs.get('enable_file_upload_notifications', None) self.cloud_to_device = kwargs.get('cloud_to_device', None) self.comments = kwargs.get('comments', None) - self.device_streams = kwargs.get('device_streams', None) self.features = kwargs.get('features', None) self.locations = None -class IotHubPropertiesDeviceStreams(Model): - """The device streams properties of iothub. - - :param streaming_endpoints: List of Device Streams Endpoints. - :type streaming_endpoints: list[str] - """ - - _attribute_map = { - 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) - self.streaming_endpoints = kwargs.get('streaming_endpoints', None) - - class IotHubQuotaMetricInfo(Model): """Quota metrics properties. @@ -1615,17 +1563,12 @@ class RoutingProperties(Model): set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint. :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties - :param enrichments: The list of user-provided enrichments that the IoT hub - applies to messages to be delivered to built-in and custom endpoints. See: - https://aka.ms/iotmsgenrich - :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] """ _attribute_map = { 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, - 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, } def __init__(self, **kwargs): @@ -1633,7 +1576,6 @@ def __init__(self, **kwargs): self.endpoints = kwargs.get('endpoints', None) self.routes = kwargs.get('routes', None) self.fallback_route = kwargs.get('fallback_route', None) - self.enrichments = kwargs.get('enrichments', None) class RoutingServiceBusQueueEndpointProperties(Model): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py index 7de261f3b8b3..d7b91821a091 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py @@ -330,40 +330,6 @@ def __init__(self, *, endpoint_id: str=None, health_status=None, **kwargs) -> No self.health_status = health_status -class EnrichmentProperties(Model): - """The properties of an enrichment that your IoT hub applies to messages - delivered to endpoints. - - All required parameters must be populated in order to send to Azure. - - :param key: Required. The key or name for the enrichment property. - :type key: str - :param value: Required. The value for the enrichment property. - :type value: str - :param endpoint_names: Required. The list of endpoints for which the - enrichment is applied to the message. - :type endpoint_names: list[str] - """ - - _validation = { - 'key': {'required': True}, - 'value': {'required': True}, - 'endpoint_names': {'required': True, 'min_items': 1}, - } - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, - } - - def __init__(self, *, key: str, value: str, endpoint_names, **kwargs) -> None: - super(EnrichmentProperties, self).__init__(**kwargs) - self.key = key - self.value = value - self.endpoint_names = endpoint_names - - class ErrorDetails(Model): """Error details. @@ -811,9 +777,12 @@ class IotHubLocationDescription(Model): """Public representation of one of the locations where a resource is provisioned. - :param location: Azure Geo Regions + :param location: The name of the Azure region :type location: str - :param role: Specific Role assigned to this location. Possible values + :param role: The role of the region, can be either primary or secondary. + The primary region is where the IoT hub is currently provisioned. The + secondary region is the the Azure disaster recovery (DR) paired region and + also the region where the IoT hub can failover to. Possible values include: 'primary', 'secondary' :type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType """ @@ -909,9 +878,6 @@ class IotHubProperties(Model): :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties :param comments: IoT hub comments. :type comments: str - :param device_streams: The device streams properties of iothub. - :type device_streams: - ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams :param features: The capabilities and features enabled for the IoT hub. Possible values include: 'None', 'DeviceManagement' :type features: str or ~azure.mgmt.iothub.models.Capabilities @@ -940,12 +906,11 @@ class IotHubProperties(Model): 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, 'comments': {'key': 'comments', 'type': 'str'}, - 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, 'features': {'key': 'features', 'type': 'str'}, 'locations': {'key': 'locations', 'type': '[IotHubLocationDescription]'}, } - def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications: bool=None, cloud_to_device=None, comments: str=None, device_streams=None, features=None, **kwargs) -> None: + def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications: bool=None, cloud_to_device=None, comments: str=None, features=None, **kwargs) -> None: super(IotHubProperties, self).__init__(**kwargs) self.authorization_policies = authorization_policies self.ip_filter_rules = ip_filter_rules @@ -959,27 +924,10 @@ def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_h self.enable_file_upload_notifications = enable_file_upload_notifications self.cloud_to_device = cloud_to_device self.comments = comments - self.device_streams = device_streams self.features = features self.locations = None -class IotHubPropertiesDeviceStreams(Model): - """The device streams properties of iothub. - - :param streaming_endpoints: List of Device Streams Endpoints. - :type streaming_endpoints: list[str] - """ - - _attribute_map = { - 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, - } - - def __init__(self, *, streaming_endpoints=None, **kwargs) -> None: - super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) - self.streaming_endpoints = streaming_endpoints - - class IotHubQuotaMetricInfo(Model): """Quota metrics properties. @@ -1615,25 +1563,19 @@ class RoutingProperties(Model): set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint. :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties - :param enrichments: The list of user-provided enrichments that the IoT hub - applies to messages to be delivered to built-in and custom endpoints. See: - https://aka.ms/iotmsgenrich - :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] """ _attribute_map = { 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, - 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, } - def __init__(self, *, endpoints=None, routes=None, fallback_route=None, enrichments=None, **kwargs) -> None: + def __init__(self, *, endpoints=None, routes=None, fallback_route=None, **kwargs) -> None: super(RoutingProperties, self).__init__(**kwargs) self.endpoints = endpoints self.routes = routes self.fallback_route = fallback_route - self.enrichments = enrichments class RoutingServiceBusQueueEndpointProperties(Model): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py index aaade9ffcdee..2b2ff5b719a8 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py @@ -24,7 +24,7 @@ class CertificatesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + :ivar api_version: The version of the API. Constant value: "2019-03-22". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22-preview" + self.api_version = "2019-03-22" self.config = config diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py index 30830c6175c9..15c9943c0027 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py @@ -26,7 +26,7 @@ class IotHubOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + :ivar api_version: The version of the API. Constant value: "2019-03-22". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22-preview" + self.api_version = "2019-03-22" self.config = config @@ -84,13 +84,15 @@ def _manual_failover_initial( def manual_failover( self, iot_hub_name, resource_group_name, failover_region, custom_headers=None, raw=False, polling=True, **operation_config): - """Manual Failover Fail over. + """Manually initiate a failover for the IoT Hub to its secondary region. - Perform manual fail over of given hub. + Manually initiate a failover for the IoT Hub to its secondary region. + To learn more, see https://aka.ms/manualfailover. - :param iot_hub_name: IotHub to fail over + :param iot_hub_name: Name of the IoT hub to failover :type iot_hub_name: str - :param resource_group_name: resource group which Iot Hub belongs to + :param resource_group_name: Name of the resource group containing the + IoT hub resource :type resource_group_name: str :param failover_region: Region the hub will be failed over to :type failover_region: str diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py index 631ec6479d81..18a11b52b985 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py @@ -27,7 +27,7 @@ class IotHubResourceOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + :ivar api_version: The version of the API. Constant value: "2019-03-22". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22-preview" + self.api_version = "2019-03-22" self.config = config diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py index e05cdc550f92..86b6ce5e5c84 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py @@ -24,7 +24,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + :ivar api_version: The version of the API. Constant value: "2019-03-22". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22-preview" + self.api_version = "2019-03-22" self.config = config diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py index fe5f959b5b3c..2f9ce741aa34 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py @@ -24,7 +24,7 @@ class ResourceProviderCommonOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22-preview". + :ivar api_version: The version of the API. Constant value: "2019-03-22". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22-preview" + self.api_version = "2019-03-22" self.config = config From 50675b78b9382f31f7b4d2f07f46417421ba085a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 12 Sep 2019 17:16:36 +0800 Subject: [PATCH 3/8] Generated from f16c41a7031814a9330179a115de9fa4efe99034 (#7197) fix: Double word "the" in iothub --- .../azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py | 2 +- .../azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py index 1fc6535253fa..0108b9666f2d 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py @@ -781,7 +781,7 @@ class IotHubLocationDescription(Model): :type location: str :param role: The role of the region, can be either primary or secondary. The primary region is where the IoT hub is currently provisioned. The - secondary region is the the Azure disaster recovery (DR) paired region and + secondary region is the Azure disaster recovery (DR) paired region and also the region where the IoT hub can failover to. Possible values include: 'primary', 'secondary' :type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py index d7b91821a091..21d7a2caa3ad 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py @@ -781,7 +781,7 @@ class IotHubLocationDescription(Model): :type location: str :param role: The role of the region, can be either primary or secondary. The primary region is where the IoT hub is currently provisioned. The - secondary region is the the Azure disaster recovery (DR) paired region and + secondary region is the Azure disaster recovery (DR) paired region and also the region where the IoT hub can failover to. Possible values include: 'primary', 'secondary' :type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType From d74a450db3681ecce10e6db68296fc585a36dab0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 16 Sep 2019 13:04:35 +0800 Subject: [PATCH 4/8] Generated from aafad88743ef7a4dcd7bbfa6afd4591ba4e327bb (#7278) new source --- .../azure/mgmt/iothub/_iot_hub_client.py | 2 +- .../azure/mgmt/iothub/models/__init__.py | 6 ++ .../iothub/models/_iot_hub_client_enums.py | 1 + .../azure/mgmt/iothub/models/_models.py | 72 ++++++++++++++++-- .../azure/mgmt/iothub/models/_models_py3.py | 76 ++++++++++++++++--- .../operations/_certificates_operations.py | 4 +- .../iothub/operations/_iot_hub_operations.py | 14 ++-- .../_iot_hub_resource_operations.py | 4 +- .../mgmt/iothub/operations/_operations.py | 4 +- .../_resource_provider_common_operations.py | 4 +- 10 files changed, 154 insertions(+), 33 deletions(-) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py index 826978d02732..a10d9e118ffe 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/_iot_hub_client.py @@ -53,7 +53,7 @@ def __init__( super(IotHubClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-03-22' + self.api_version = '2019-07-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py index f8f8179d170c..855c564865d3 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py @@ -19,6 +19,7 @@ from ._models_py3 import CertificateWithNonceDescription from ._models_py3 import CloudToDeviceProperties from ._models_py3 import EndpointHealthData + from ._models_py3 import EnrichmentProperties from ._models_py3 import ErrorDetails, ErrorDetailsException from ._models_py3 import EventHubConsumerGroupInfo from ._models_py3 import EventHubProperties @@ -32,6 +33,7 @@ from ._models_py3 import IotHubLocationDescription from ._models_py3 import IotHubNameAvailabilityInfo from ._models_py3 import IotHubProperties + from ._models_py3 import IotHubPropertiesDeviceStreams from ._models_py3 import IotHubQuotaMetricInfo from ._models_py3 import IotHubSkuDescription from ._models_py3 import IotHubSkuInfo @@ -78,6 +80,7 @@ from ._models import CertificateWithNonceDescription from ._models import CloudToDeviceProperties from ._models import EndpointHealthData + from ._models import EnrichmentProperties from ._models import ErrorDetails, ErrorDetailsException from ._models import EventHubConsumerGroupInfo from ._models import EventHubProperties @@ -91,6 +94,7 @@ from ._models import IotHubLocationDescription from ._models import IotHubNameAvailabilityInfo from ._models import IotHubProperties + from ._models import IotHubPropertiesDeviceStreams from ._models import IotHubQuotaMetricInfo from ._models import IotHubSkuDescription from ._models import IotHubSkuInfo @@ -162,6 +166,7 @@ 'CertificateWithNonceDescription', 'CloudToDeviceProperties', 'EndpointHealthData', + 'EnrichmentProperties', 'ErrorDetails', 'ErrorDetailsException', 'EventHubConsumerGroupInfo', 'EventHubProperties', @@ -175,6 +180,7 @@ 'IotHubLocationDescription', 'IotHubNameAvailabilityInfo', 'IotHubProperties', + 'IotHubPropertiesDeviceStreams', 'IotHubQuotaMetricInfo', 'IotHubSkuDescription', 'IotHubSkuInfo', diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py index e2619c34c7ed..62003c4b182b 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_iot_hub_client_enums.py @@ -44,6 +44,7 @@ class RoutingSource(str, Enum): twin_change_events = "TwinChangeEvents" device_lifecycle_events = "DeviceLifecycleEvents" device_job_lifecycle_events = "DeviceJobLifecycleEvents" + digital_twin_change_events = "DigitalTwinChangeEvents" class Capabilities(str, Enum): diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py index 0108b9666f2d..6953a265c6b4 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py @@ -330,6 +330,40 @@ def __init__(self, **kwargs): self.health_status = kwargs.get('health_status', None) +class EnrichmentProperties(Model): + """The properties of an enrichment that your IoT hub applies to messages + delivered to endpoints. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key or name for the enrichment property. + :type key: str + :param value: Required. The value for the enrichment property. + :type value: str + :param endpoint_names: Required. The list of endpoints for which the + enrichment is applied to the message. + :type endpoint_names: list[str] + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + 'endpoint_names': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(EnrichmentProperties, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) + self.endpoint_names = kwargs.get('endpoint_names', None) + + class ErrorDetails(Model): """Error details. @@ -777,12 +811,9 @@ class IotHubLocationDescription(Model): """Public representation of one of the locations where a resource is provisioned. - :param location: The name of the Azure region + :param location: Azure Geo Regions :type location: str - :param role: The role of the region, can be either primary or secondary. - The primary region is where the IoT hub is currently provisioned. The - secondary region is the Azure disaster recovery (DR) paired region and - also the region where the IoT hub can failover to. Possible values + :param role: Specific Role assigned to this location. Possible values include: 'primary', 'secondary' :type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType """ @@ -878,6 +909,9 @@ class IotHubProperties(Model): :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties :param comments: IoT hub comments. :type comments: str + :param device_streams: The device streams properties of iothub. + :type device_streams: + ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams :param features: The capabilities and features enabled for the IoT hub. Possible values include: 'None', 'DeviceManagement' :type features: str or ~azure.mgmt.iothub.models.Capabilities @@ -906,6 +940,7 @@ class IotHubProperties(Model): 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, 'comments': {'key': 'comments', 'type': 'str'}, + 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, 'features': {'key': 'features', 'type': 'str'}, 'locations': {'key': 'locations', 'type': '[IotHubLocationDescription]'}, } @@ -924,10 +959,27 @@ def __init__(self, **kwargs): self.enable_file_upload_notifications = kwargs.get('enable_file_upload_notifications', None) self.cloud_to_device = kwargs.get('cloud_to_device', None) self.comments = kwargs.get('comments', None) + self.device_streams = kwargs.get('device_streams', None) self.features = kwargs.get('features', None) self.locations = None +class IotHubPropertiesDeviceStreams(Model): + """The device streams properties of iothub. + + :param streaming_endpoints: List of Device Streams Endpoints. + :type streaming_endpoints: list[str] + """ + + _attribute_map = { + 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) + self.streaming_endpoints = kwargs.get('streaming_endpoints', None) + + class IotHubQuotaMetricInfo(Model): """Quota metrics properties. @@ -1401,7 +1453,7 @@ class RouteProperties(Model): :param source: Required. The source that the routing rule is to be applied to, such as DeviceMessages. Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - 'DeviceJobLifecycleEvents' + 'DeviceJobLifecycleEvents', 'DigitalTwinChangeEvents' :type source: str or ~azure.mgmt.iothub.models.RoutingSource :param condition: The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For @@ -1563,12 +1615,17 @@ class RoutingProperties(Model): set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint. :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties + :param enrichments: The list of user-provided enrichments that the IoT hub + applies to messages to be delivered to built-in and custom endpoints. See: + https://aka.ms/iotmsgenrich + :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] """ _attribute_map = { 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, + 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, } def __init__(self, **kwargs): @@ -1576,6 +1633,7 @@ def __init__(self, **kwargs): self.endpoints = kwargs.get('endpoints', None) self.routes = kwargs.get('routes', None) self.fallback_route = kwargs.get('fallback_route', None) + self.enrichments = kwargs.get('enrichments', None) class RoutingServiceBusQueueEndpointProperties(Model): @@ -1880,7 +1938,7 @@ class TestAllRoutesInput(Model): :param routing_source: Routing source. Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - 'DeviceJobLifecycleEvents' + 'DeviceJobLifecycleEvents', 'DigitalTwinChangeEvents' :type routing_source: str or ~azure.mgmt.iothub.models.RoutingSource :param message: Routing message :type message: ~azure.mgmt.iothub.models.RoutingMessage diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py index 21d7a2caa3ad..ae63b49a6421 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models_py3.py @@ -330,6 +330,40 @@ def __init__(self, *, endpoint_id: str=None, health_status=None, **kwargs) -> No self.health_status = health_status +class EnrichmentProperties(Model): + """The properties of an enrichment that your IoT hub applies to messages + delivered to endpoints. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key or name for the enrichment property. + :type key: str + :param value: Required. The value for the enrichment property. + :type value: str + :param endpoint_names: Required. The list of endpoints for which the + enrichment is applied to the message. + :type endpoint_names: list[str] + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + 'endpoint_names': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'endpoint_names': {'key': 'endpointNames', 'type': '[str]'}, + } + + def __init__(self, *, key: str, value: str, endpoint_names, **kwargs) -> None: + super(EnrichmentProperties, self).__init__(**kwargs) + self.key = key + self.value = value + self.endpoint_names = endpoint_names + + class ErrorDetails(Model): """Error details. @@ -777,12 +811,9 @@ class IotHubLocationDescription(Model): """Public representation of one of the locations where a resource is provisioned. - :param location: The name of the Azure region + :param location: Azure Geo Regions :type location: str - :param role: The role of the region, can be either primary or secondary. - The primary region is where the IoT hub is currently provisioned. The - secondary region is the Azure disaster recovery (DR) paired region and - also the region where the IoT hub can failover to. Possible values + :param role: Specific Role assigned to this location. Possible values include: 'primary', 'secondary' :type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType """ @@ -878,6 +909,9 @@ class IotHubProperties(Model): :type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties :param comments: IoT hub comments. :type comments: str + :param device_streams: The device streams properties of iothub. + :type device_streams: + ~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams :param features: The capabilities and features enabled for the IoT hub. Possible values include: 'None', 'DeviceManagement' :type features: str or ~azure.mgmt.iothub.models.Capabilities @@ -906,11 +940,12 @@ class IotHubProperties(Model): 'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'}, 'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'}, 'comments': {'key': 'comments', 'type': 'str'}, + 'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'}, 'features': {'key': 'features', 'type': 'str'}, 'locations': {'key': 'locations', 'type': '[IotHubLocationDescription]'}, } - def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications: bool=None, cloud_to_device=None, comments: str=None, features=None, **kwargs) -> None: + def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications: bool=None, cloud_to_device=None, comments: str=None, device_streams=None, features=None, **kwargs) -> None: super(IotHubProperties, self).__init__(**kwargs) self.authorization_policies = authorization_policies self.ip_filter_rules = ip_filter_rules @@ -924,10 +959,27 @@ def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_h self.enable_file_upload_notifications = enable_file_upload_notifications self.cloud_to_device = cloud_to_device self.comments = comments + self.device_streams = device_streams self.features = features self.locations = None +class IotHubPropertiesDeviceStreams(Model): + """The device streams properties of iothub. + + :param streaming_endpoints: List of Device Streams Endpoints. + :type streaming_endpoints: list[str] + """ + + _attribute_map = { + 'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'}, + } + + def __init__(self, *, streaming_endpoints=None, **kwargs) -> None: + super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs) + self.streaming_endpoints = streaming_endpoints + + class IotHubQuotaMetricInfo(Model): """Quota metrics properties. @@ -1401,7 +1453,7 @@ class RouteProperties(Model): :param source: Required. The source that the routing rule is to be applied to, such as DeviceMessages. Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - 'DeviceJobLifecycleEvents' + 'DeviceJobLifecycleEvents', 'DigitalTwinChangeEvents' :type source: str or ~azure.mgmt.iothub.models.RoutingSource :param condition: The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For @@ -1563,19 +1615,25 @@ class RoutingProperties(Model): set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint. :type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties + :param enrichments: The list of user-provided enrichments that the IoT hub + applies to messages to be delivered to built-in and custom endpoints. See: + https://aka.ms/iotmsgenrich + :type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties] """ _attribute_map = { 'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'}, 'routes': {'key': 'routes', 'type': '[RouteProperties]'}, 'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'}, + 'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'}, } - def __init__(self, *, endpoints=None, routes=None, fallback_route=None, **kwargs) -> None: + def __init__(self, *, endpoints=None, routes=None, fallback_route=None, enrichments=None, **kwargs) -> None: super(RoutingProperties, self).__init__(**kwargs) self.endpoints = endpoints self.routes = routes self.fallback_route = fallback_route + self.enrichments = enrichments class RoutingServiceBusQueueEndpointProperties(Model): @@ -1880,7 +1938,7 @@ class TestAllRoutesInput(Model): :param routing_source: Routing source. Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - 'DeviceJobLifecycleEvents' + 'DeviceJobLifecycleEvents', 'DigitalTwinChangeEvents' :type routing_source: str or ~azure.mgmt.iothub.models.RoutingSource :param message: Routing message :type message: ~azure.mgmt.iothub.models.RoutingMessage diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py index 2b2ff5b719a8..465ea7e3e5c3 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_certificates_operations.py @@ -24,7 +24,7 @@ class CertificatesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22". + :ivar api_version: The version of the API. Constant value: "2019-07-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22" + self.api_version = "2019-07-01-preview" self.config = config diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py index 15c9943c0027..dc02947b6c9a 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_operations.py @@ -26,7 +26,7 @@ class IotHubOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22". + :ivar api_version: The version of the API. Constant value: "2019-07-01-preview". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22" + self.api_version = "2019-07-01-preview" self.config = config @@ -84,15 +84,13 @@ def _manual_failover_initial( def manual_failover( self, iot_hub_name, resource_group_name, failover_region, custom_headers=None, raw=False, polling=True, **operation_config): - """Manually initiate a failover for the IoT Hub to its secondary region. + """Manual Failover Fail over. - Manually initiate a failover for the IoT Hub to its secondary region. - To learn more, see https://aka.ms/manualfailover. + Perform manual fail over of given hub. - :param iot_hub_name: Name of the IoT hub to failover + :param iot_hub_name: IotHub to fail over :type iot_hub_name: str - :param resource_group_name: Name of the resource group containing the - IoT hub resource + :param resource_group_name: resource group which Iot Hub belongs to :type resource_group_name: str :param failover_region: Region the hub will be failed over to :type failover_region: str diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py index 18a11b52b985..43154348c51d 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_iot_hub_resource_operations.py @@ -27,7 +27,7 @@ class IotHubResourceOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22". + :ivar api_version: The version of the API. Constant value: "2019-07-01-preview". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22" + self.api_version = "2019-07-01-preview" self.config = config diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py index 86b6ce5e5c84..928809c59ad3 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_operations.py @@ -24,7 +24,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22". + :ivar api_version: The version of the API. Constant value: "2019-07-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22" + self.api_version = "2019-07-01-preview" self.config = config diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py index 2f9ce741aa34..d15208ac8a1f 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/operations/_resource_provider_common_operations.py @@ -24,7 +24,7 @@ class ResourceProviderCommonOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2019-03-22". + :ivar api_version: The version of the API. Constant value: "2019-07-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-22" + self.api_version = "2019-07-01-preview" self.config = config From e4b45693d7544b8dea1991585d06378de171574b Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Sun, 29 Sep 2019 13:06:13 +0800 Subject: [PATCH 5/8] release notes and version --- sdk/iothub/azure-mgmt-iothub/HISTORY.rst | 7 +++++++ sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/version.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sdk/iothub/azure-mgmt-iothub/HISTORY.rst b/sdk/iothub/azure-mgmt-iothub/HISTORY.rst index 1ab04594f5da..3e0116c73516 100644 --- a/sdk/iothub/azure-mgmt-iothub/HISTORY.rst +++ b/sdk/iothub/azure-mgmt-iothub/HISTORY.rst @@ -3,6 +3,13 @@ Release History =============== +0.9.0rc1 (2019-09-29) ++++++++++++++++++++++ + +**Features** + +- Model IotHubProperties has a new parameter locations + 0.8.2 (2019-05-15) ++++++++++++++++++ diff --git a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/version.py b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/version.py index 0a72a39badd5..dd27810924cc 100644 --- a/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/version.py +++ b/sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.8.2" +VERSION = "0.9.0rc1" From 83722b7553ab22a072b1c84eb622de09fdbc17ac Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Sun, 29 Sep 2019 05:46:43 +0000 Subject: [PATCH 6/8] rerun tests --- .../test_mgmt_iothub.test_iothub.yaml | 954 +++++++++++------- ...gmt_iothub.test_iothub_consumer_group.yaml | 589 +++++++---- 2 files changed, 996 insertions(+), 547 deletions(-) diff --git a/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub.yaml b/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub.yaml index 20da5ecaa977..07ddc0532d7f 100644 --- a/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub.yaml +++ b/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub.yaml @@ -2,423 +2,685 @@ interactions: - request: body: '{"name": "iota8d80b97"}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['23'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '23' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/checkNameAvailability?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/checkNameAvailability?api-version=2019-07-01-preview response: - body: {string: '{"nameAvailable":true,"reason":"Invalid","message":null}'} - headers: - cache-control: [no-cache] - content-length: ['56'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:13:00 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 200, message: OK} + body: + string: '{"nameAvailable":true,"reason":"Invalid","message":null}' + headers: + cache-control: + - no-cache + content-length: + - '56' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:40:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK - request: body: '{"location": "westus", "properties": {"enableFileUploadNotifications": false, "features": "None"}, "sku": {"name": "S1", "capacity": 2}}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['136'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '136' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-07-01-preview response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","properties":{"state":"Activating","provisioningState":"Accepted","enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}'} - headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfYjIzZGNmNDMtZmMzNS00MjNlLWEyZDYtOThmZjUwYTZmZWJk?api-version=2019-03-22-preview&operationSource=os_ih&asyncinfo'] - cache-control: [no-cache] - content-length: ['688'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:13:02 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests: ['4999'] - status: {code: 201, message: Created} + body: + string: '{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","properties":{"state":"Activating","provisioningState":"Accepted","enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfMDlhODQxMjgtMWNlMi00M2VkLTliYTAtOGU4ODc5NTViMGYx?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + cache-control: + - no-cache + content-length: + - '688' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:40:59 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '4999' + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfYjIzZGNmNDMtZmMzNS00MjNlLWEyZDYtOThmZjUwYTZmZWJk?api-version=2019-03-22-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfMDlhODQxMjgtMWNlMi00M2VkLTliYTAtOGU4ODc5NTViMGYx?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: - body: {string: '{"status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['20'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:13:33 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:41:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfYjIzZGNmNDMtZmMzNS00MjNlLWEyZDYtOThmZjUwYTZmZWJk?api-version=2019-03-22-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfMDlhODQxMjgtMWNlMi00M2VkLTliYTAtOGU4ODc5NTViMGYx?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: - body: {string: '{"status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['20'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:14:03 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:42:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfYjIzZGNmNDMtZmMzNS00MjNlLWEyZDYtOThmZjUwYTZmZWJk?api-version=2019-03-22-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfMDlhODQxMjgtMWNlMi00M2VkLTliYTAtOGU4ODc5NTViMGYx?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: - body: {string: '{"status":"Running"}'} - headers: - cache-control: [no-cache] - content-length: ['20'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:14:33 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:42:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfYjIzZGNmNDMtZmMzNS00MjNlLWEyZDYtOThmZjUwYTZmZWJk?api-version=2019-03-22-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-07-01-preview response: - body: {string: '{"status":"Succeeded"}'} - headers: - cache-control: [no-cache] - content-length: ['22'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:15:04 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + body: + string: '{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAh33zQ=","properties":{"locations":[{"location":"West + US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iota8d80b97.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97","endpoint":"sb://iothub-ns-iota8d80b9-2239559-d9bf4bb908.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}' + headers: + cache-control: + - no-cache + content-length: + - '1543' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:42:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-07-01-preview response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAW/Iz8=","properties":{"locations":[{"location":"West - US","role":"primary"},{"location":"East US","role":"secondary"}],"operationsMonitoringProperties":{"events":{"None":"None","Connections":"None","DeviceTelemetry":"None","C2DCommands":"None","DeviceIdentityOperations":"None","FileUploadOperations":"None","Routes":"None"}},"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iota8d80b97.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97","endpoint":"sb://iothub-ns-iota8d80b9-1621598-89ee8d90cb.servicebus.windows.net/"},"operationsMonitoringEvents":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97-operationmonitoring","endpoint":"sb://iothub-ns-iota8d80b9-1621598-89ee8d90cb.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}'} - headers: - cache-control: [no-cache] - content-length: ['1980'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:15:04 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + body: + string: '{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAh33zQ=","properties":{"locations":[{"location":"West + US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iota8d80b97.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97","endpoint":"sb://iothub-ns-iota8d80b9-2239559-d9bf4bb908.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}' + headers: + cache-control: + - no-cache + content-length: + - '1543' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:42:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs?api-version=2019-07-01-preview response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAW/Iz8=","properties":{"locations":[{"location":"West - US","role":"primary"},{"location":"East US","role":"secondary"}],"operationsMonitoringProperties":{"events":{"None":"None","Connections":"None","DeviceTelemetry":"None","C2DCommands":"None","DeviceIdentityOperations":"None","FileUploadOperations":"None","Routes":"None"}},"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iota8d80b97.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97","endpoint":"sb://iothub-ns-iota8d80b9-1621598-89ee8d90cb.servicebus.windows.net/"},"operationsMonitoringEvents":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97-operationmonitoring","endpoint":"sb://iothub-ns-iota8d80b9-1621598-89ee8d90cb.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}'} - headers: - cache-control: [no-cache] - content-length: ['1980'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:15:05 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + body: + string: '{"value":[{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAh33zQ=","properties":{"locations":[{"location":"West + US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iota8d80b97.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97","endpoint":"sb://iothub-ns-iota8d80b9-2239559-d9bf4bb908.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1555' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:42:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/IotHubs?api-version=2019-07-01-preview response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAW/Iz8=","properties":{"locations":[{"location":"West - US","role":"primary"},{"location":"East US","role":"secondary"}],"operationsMonitoringProperties":{"events":{"None":"None","Connections":"None","DeviceTelemetry":"None","C2DCommands":"None","DeviceIdentityOperations":"None","FileUploadOperations":"None","Routes":"None"}},"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iota8d80b97.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97","endpoint":"sb://iothub-ns-iota8d80b9-1621598-89ee8d90cb.servicebus.windows.net/"},"operationsMonitoringEvents":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97-operationmonitoring","endpoint":"sb://iothub-ns-iota8d80b9-1621598-89ee8d90cb.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}]}'} - headers: - cache-control: [no-cache] - content-length: ['1992'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:15:05 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + body: + string: '{"value":[{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAh33zQ=","properties":{"locations":[{"location":"West + US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iota8d80b97.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97","endpoint":"sb://iothub-ns-iota8d80b9-2239559-d9bf4bb908.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1555' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:42:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/IotHubs?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/IotHubStats?api-version=2019-07-01-preview response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAW/Iz8=","properties":{"locations":[{"location":"West - US","role":"primary"},{"location":"East US","role":"secondary"}],"operationsMonitoringProperties":{"events":{"None":"None","Connections":"None","DeviceTelemetry":"None","C2DCommands":"None","DeviceIdentityOperations":"None","FileUploadOperations":"None","Routes":"None"}},"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iota8d80b97.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97","endpoint":"sb://iothub-ns-iota8d80b9-1621598-89ee8d90cb.servicebus.windows.net/"},"operationsMonitoringEvents":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97-operationmonitoring","endpoint":"sb://iothub-ns-iota8d80b9-1621598-89ee8d90cb.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}]}'} - headers: - cache-control: [no-cache] - content-length: ['1992'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:15:06 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + body: + string: '{"totalDeviceCount":0,"enabledDeviceCount":0,"disabledDeviceCount":0}' + headers: + cache-control: + - no-cache + content-length: + - '69' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:42:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/IotHubStats?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/skus?api-version=2019-07-01-preview response: - body: {string: '{"totalDeviceCount":0,"enabledDeviceCount":0,"disabledDeviceCount":0}'} - headers: - cache-control: [no-cache] - content-length: ['69'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:15:06 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + body: + string: '{"value":[{"resourceType":"Microsoft.Devices/IotHubs","sku":{"name":"S1","tier":"Standard"},"capacity":{"minimum":1,"maximum":200,"default":1,"scaleType":"Manual"}},{"resourceType":"Microsoft.Devices/IotHubs","sku":{"name":"S2","tier":"Standard"},"capacity":{"minimum":1,"maximum":200,"default":1,"scaleType":"Manual"}},{"resourceType":"Microsoft.Devices/IotHubs","sku":{"name":"S3","tier":"Standard"},"capacity":{"minimum":1,"maximum":10,"default":1,"scaleType":"Manual"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '475' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:42:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/skus?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/jobs?api-version=2019-07-01-preview response: - body: {string: '{"value":[{"resourceType":"Microsoft.Devices/IotHubs","sku":{"name":"S1","tier":"Standard"},"capacity":{"minimum":1,"maximum":200,"default":1,"scaleType":"Manual"}},{"resourceType":"Microsoft.Devices/IotHubs","sku":{"name":"S2","tier":"Standard"},"capacity":{"minimum":1,"maximum":200,"default":1,"scaleType":"Manual"}},{"resourceType":"Microsoft.Devices/IotHubs","sku":{"name":"S3","tier":"Standard"},"capacity":{"minimum":1,"maximum":10,"default":1,"scaleType":"Manual"}}]}'} - headers: - cache-control: [no-cache] - content-length: ['475'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:15:07 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/jobs?api-version=2019-03-22-preview - response: - body: {string: '{"value":[]}'} - headers: - cache-control: [no-cache] - content-length: ['12'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:15:07 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:42:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/quotaMetrics?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/quotaMetrics?api-version=2019-07-01-preview response: - body: {string: '{"value":[{"name":"TotalMessages","currentValue":0,"maxValue":800000},{"name":"TotalDeviceCount","currentValue":0,"maxValue":1000000}]}'} - headers: - cache-control: [no-cache] - content-length: ['135'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:15:08 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + body: + string: '{"value":[{"name":"TotalMessages","currentValue":0,"maxValue":800000},{"name":"TotalDeviceCount","currentValue":0,"maxValue":1000000}]}' + headers: + cache-control: + - no-cache + content-length: + - '135' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:42:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-07-01-preview response: - body: {string: 'null'} - headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfMWZlNWM2NDQtMjEzMC00NWRkLWE2ZjgtMDk2OTk3MjkwM2Rh?api-version=2019-03-22-preview&operationSource=os_ih&asyncinfo'] - cache-control: [no-cache] - content-length: ['4'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:15:10 GMT'] - expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfMWZlNWM2NDQtMjEzMC00NWRkLWE2ZjgtMDk2OTk3MjkwM2Rh?api-version=2019-03-22-preview&operationSource=os_ih'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-deletes: ['14999'] - status: {code: 202, message: Accepted} + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfOGFlOTgzMjItNTAzYi00NGVjLTgyZTAtYTFiYjQyMTdmMTAz?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:42:37 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfOGFlOTgzMjItNTAzYi00NGVjLTgyZTAtYTFiYjQyMTdmMTAz?api-version=2019-07-01-preview&operationSource=os_ih + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfMWZlNWM2NDQtMjEzMC00NWRkLWE2ZjgtMDk2OTk3MjkwM2Rh?api-version=2019-03-22-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfOGFlOTgzMjItNTAzYi00NGVjLTgyZTAtYTFiYjQyMTdmMTAz?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: - body: {string: '{"status":"Succeeded"}'} - headers: - cache-control: [no-cache] - content-length: ['22'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:15:25 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:42:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK version: 1 diff --git a/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub_consumer_group.yaml b/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub_consumer_group.yaml index 6a22418fb686..f82e23096d39 100644 --- a/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub_consumer_group.yaml +++ b/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub_consumer_group.yaml @@ -3,262 +3,449 @@ interactions: body: '{"location": "westus", "properties": {"enableFileUploadNotifications": false, "features": "None"}, "sku": {"name": "S1", "capacity": 2}}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['136'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '136' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee?api-version=2019-07-01-preview response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee","name":"iot88d011ee","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothub_consumer_group88d011ee","properties":{"state":"Activating","provisioningState":"Accepted","enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}'} + body: + string: '{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee","name":"iot88d011ee","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothub_consumer_group88d011ee","properties":{"state":"Activating","provisioningState":"Accepted","enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}' headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfYjM4ZDRjYzgtNmNmOS00MmZkLWFhYTEtMDhjN2U4Y2FiMTQz?api-version=2019-03-22-preview&operationSource=os_ih&asyncinfo'] - cache-control: [no-cache] - content-length: ['718'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:15:31 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests: ['4999'] - status: {code: 201, message: Created} + azure-asyncoperation: + - https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + cache-control: + - no-cache + content-length: + - '718' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:43:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '4999' + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfYjM4ZDRjYzgtNmNmOS00MmZkLWFhYTEtMDhjN2U4Y2FiMTQz?api-version=2019-03-22-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: - body: {string: '{"status":"Running"}'} + body: + string: '{"status":"Running"}' headers: - cache-control: [no-cache] - content-length: ['20'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:16:01 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:43:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfYjM4ZDRjYzgtNmNmOS00MmZkLWFhYTEtMDhjN2U4Y2FiMTQz?api-version=2019-03-22-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: - body: {string: '{"status":"Running"}'} + body: + string: '{"status":"Running"}' headers: - cache-control: [no-cache] - content-length: ['20'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:16:32 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:44:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfYjM4ZDRjYzgtNmNmOS00MmZkLWFhYTEtMDhjN2U4Y2FiMTQz?api-version=2019-03-22-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: - body: {string: '{"status":"Running"}'} + body: + string: '{"status":"Running"}' headers: - cache-control: [no-cache] - content-length: ['20'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:17:02 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:44:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfYjM4ZDRjYzgtNmNmOS00MmZkLWFhYTEtMDhjN2U4Y2FiMTQz?api-version=2019-03-22-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: - body: {string: '{"status":"Succeeded"}'} + body: + string: '{"status":"Succeeded"}' headers: - cache-control: [no-cache] - content-length: ['22'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:17:32 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:45:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee?api-version=2019-07-01-preview response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee","name":"iot88d011ee","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothub_consumer_group88d011ee","etag":"AAAAAAW/Jf4=","properties":{"locations":[{"location":"West - US","role":"primary"},{"location":"East US","role":"secondary"}],"operationsMonitoringProperties":{"events":{"None":"None","Connections":"None","DeviceTelemetry":"None","C2DCommands":"None","DeviceIdentityOperations":"None","FileUploadOperations":"None","Routes":"None"}},"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iot88d011ee.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iot88d011ee","endpoint":"sb://iothub-ns-iot88d011e-1621610-f6bd038780.servicebus.windows.net/"},"operationsMonitoringEvents":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iot88d011ee-operationmonitoring","endpoint":"sb://iothub-ns-iot88d011e-1621610-f6bd038780.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}'} + body: + string: '{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee","name":"iot88d011ee","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothub_consumer_group88d011ee","etag":"AAAAAAh34R8=","properties":{"locations":[{"location":"West + US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iot88d011ee.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iot88d011ee","endpoint":"sb://iothub-ns-iot88d011e-2239563-4b368280db.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}' headers: - cache-control: [no-cache] - content-length: ['2010'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:17:33 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '1573' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:45:17 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee?api-version=2019-07-01-preview response: - body: {string: '{"properties":{"created":"Fri, 10 May 2019 16:17:35 GMT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee","name":"consumergrp88d011ee","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null}'} + body: + string: '{"properties":{"created":"Sun, 29 Sep 2019 05:45:19 GMT"},"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee","name":"consumergrp88d011ee","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null}' headers: - cache-control: [no-cache] - content-length: ['401'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:17:35 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '401' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:45:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee?api-version=2019-07-01-preview response: - body: {string: '{"properties":{"created":"Fri, 10 May 2019 16:17:35 GMT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee","name":"consumergrp88d011ee","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null}'} + body: + string: '{"properties":{"created":"Sun, 29 Sep 2019 05:45:19 GMT"},"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee","name":"consumergrp88d011ee","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null}' headers: - cache-control: [no-cache] - content-length: ['401'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:17:36 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '401' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:45:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups?api-version=2019-07-01-preview response: - body: {string: '{"value":[{"properties":{"created":"Fri, 10 May 2019 16:16:30 - GMT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/%24Default","name":"$Default","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null},{"properties":{"created":"Fri, - 10 May 2019 16:17:35 GMT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee","name":"consumergrp88d011ee","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null}]}'} + body: + string: '{"value":[{"properties":{"created":"Sun, 29 Sep 2019 05:44:44 GMT"},"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/%24Default","name":"$Default","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null},{"properties":{"created":"Sun, + 29 Sep 2019 05:45:19 GMT"},"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee","name":"consumergrp88d011ee","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null}]}' headers: - cache-control: [no-cache] - content-length: ['795'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 10 May 2019 16:17:36 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '795' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 29 Sep 2019 05:45:20 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [python/3.7.0 (Windows-10-10.0.18362-SP0) msrest/0.6.4 msrest_azure/0.6.0 - azure-mgmt-iothub/0.6.0 Azure-SDK-For-Python] - accept-language: [en-US] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 + msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python + accept-language: + - en-US method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee?api-version=2019-03-22-preview + uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee?api-version=2019-07-01-preview response: - body: {string: ''} + body: + string: '' headers: - cache-control: [no-cache] - content-length: ['0'] - date: ['Fri, 10 May 2019 16:17:37 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-HTTPAPI/2.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-deletes: ['14999'] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '0' + date: + - Sun, 29 Sep 2019 05:45:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK version: 1 From 63e83c2afe924aa63da6936199411eeaa0e7f2cf Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Sun, 29 Sep 2019 14:13:28 +0800 Subject: [PATCH 7/8] fixed subscription id --- .../test_mgmt_iothub.test_iothub.yaml | 46 +++++++++---------- ...gmt_iothub.test_iothub_consumer_group.yaml | 34 +++++++------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub.yaml b/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub.yaml index 07ddc0532d7f..7d09a047829d 100644 --- a/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub.yaml +++ b/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub.yaml @@ -18,7 +18,7 @@ interactions: accept-language: - en-US method: POST - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/checkNameAvailability?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/checkNameAvailability?api-version=2019-07-01-preview response: body: string: '{"nameAvailable":true,"reason":"Invalid","message":null}' @@ -70,13 +70,13 @@ interactions: accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-07-01-preview response: body: - string: '{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","properties":{"state":"Activating","provisioningState":"Accepted","enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","properties":{"state":"Activating","provisioningState":"Accepted","enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfMDlhODQxMjgtMWNlMi00M2VkLTliYTAtOGU4ODc5NTViMGYx?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfMDlhODQxMjgtMWNlMi00M2VkLTliYTAtOGU4ODc5NTViMGYx?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo cache-control: - no-cache content-length: @@ -113,7 +113,7 @@ interactions: - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfMDlhODQxMjgtMWNlMi00M2VkLTliYTAtOGU4ODc5NTViMGYx?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfMDlhODQxMjgtMWNlMi00M2VkLTliYTAtOGU4ODc5NTViMGYx?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: body: string: '{"status":"Running"}' @@ -156,7 +156,7 @@ interactions: - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfMDlhODQxMjgtMWNlMi00M2VkLTliYTAtOGU4ODc5NTViMGYx?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfMDlhODQxMjgtMWNlMi00M2VkLTliYTAtOGU4ODc5NTViMGYx?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: body: string: '{"status":"Running"}' @@ -199,7 +199,7 @@ interactions: - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfMDlhODQxMjgtMWNlMi00M2VkLTliYTAtOGU4ODc5NTViMGYx?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfMDlhODQxMjgtMWNlMi00M2VkLTliYTAtOGU4ODc5NTViMGYx?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: body: string: '{"status":"Succeeded"}' @@ -242,10 +242,10 @@ interactions: - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-07-01-preview response: body: - string: '{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAh33zQ=","properties":{"locations":[{"location":"West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAh33zQ=","properties":{"locations":[{"location":"West US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iota8d80b97.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97","endpoint":"sb://iothub-ns-iota8d80b9-2239559-d9bf4bb908.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}' headers: cache-control: @@ -288,10 +288,10 @@ interactions: accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-07-01-preview response: body: - string: '{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAh33zQ=","properties":{"locations":[{"location":"West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAh33zQ=","properties":{"locations":[{"location":"West US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iota8d80b97.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97","endpoint":"sb://iothub-ns-iota8d80b9-2239559-d9bf4bb908.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}' headers: cache-control: @@ -334,10 +334,10 @@ interactions: accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs?api-version=2019-07-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAh33zQ=","properties":{"locations":[{"location":"West + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAh33zQ=","properties":{"locations":[{"location":"West US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iota8d80b97.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97","endpoint":"sb://iothub-ns-iota8d80b9-2239559-d9bf4bb908.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}]}' headers: cache-control: @@ -380,10 +380,10 @@ interactions: accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/IotHubs?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/IotHubs?api-version=2019-07-01-preview response: body: - string: '{"value":[{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAh33zQ=","properties":{"locations":[{"location":"West + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97","name":"iota8d80b97","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothuba8d80b97","etag":"AAAAAAh33zQ=","properties":{"locations":[{"location":"West US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iota8d80b97.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iota8d80b97","endpoint":"sb://iothub-ns-iota8d80b9-2239559-d9bf4bb908.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}]}' headers: cache-control: @@ -426,7 +426,7 @@ interactions: accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/IotHubStats?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/IotHubStats?api-version=2019-07-01-preview response: body: string: '{"totalDeviceCount":0,"enabledDeviceCount":0,"disabledDeviceCount":0}' @@ -471,7 +471,7 @@ interactions: accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/skus?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/skus?api-version=2019-07-01-preview response: body: string: '{"value":[{"resourceType":"Microsoft.Devices/IotHubs","sku":{"name":"S1","tier":"Standard"},"capacity":{"minimum":1,"maximum":200,"default":1,"scaleType":"Manual"}},{"resourceType":"Microsoft.Devices/IotHubs","sku":{"name":"S2","tier":"Standard"},"capacity":{"minimum":1,"maximum":200,"default":1,"scaleType":"Manual"}},{"resourceType":"Microsoft.Devices/IotHubs","sku":{"name":"S3","tier":"Standard"},"capacity":{"minimum":1,"maximum":10,"default":1,"scaleType":"Manual"}}]}' @@ -516,7 +516,7 @@ interactions: accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/jobs?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/jobs?api-version=2019-07-01-preview response: body: string: '{"value":[]}' @@ -561,7 +561,7 @@ interactions: accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/quotaMetrics?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97/quotaMetrics?api-version=2019-07-01-preview response: body: string: '{"value":[{"name":"TotalMessages","currentValue":0,"maxValue":800000},{"name":"TotalDeviceCount","currentValue":0,"maxValue":1000000}]}' @@ -608,13 +608,13 @@ interactions: accept-language: - en-US method: DELETE - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothuba8d80b97/providers/Microsoft.Devices/IotHubs/iota8d80b97?api-version=2019-07-01-preview response: body: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfOGFlOTgzMjItNTAzYi00NGVjLTgyZTAtYTFiYjQyMTdmMTAz?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfOGFlOTgzMjItNTAzYi00NGVjLTgyZTAtYTFiYjQyMTdmMTAz?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo cache-control: - no-cache content-length: @@ -626,7 +626,7 @@ interactions: expires: - '-1' location: - - https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfOGFlOTgzMjItNTAzYi00NGVjLTgyZTAtYTFiYjQyMTdmMTAz?api-version=2019-07-01-preview&operationSource=os_ih + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfOGFlOTgzMjItNTAzYi00NGVjLTgyZTAtYTFiYjQyMTdmMTAz?api-version=2019-07-01-preview&operationSource=os_ih pragma: - no-cache server: @@ -653,7 +653,7 @@ interactions: - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfOGFlOTgzMjItNTAzYi00NGVjLTgyZTAtYTFiYjQyMTdmMTAz?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfOGFlOTgzMjItNTAzYi00NGVjLTgyZTAtYTFiYjQyMTdmMTAz?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: body: string: '{"status":"Succeeded"}' diff --git a/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub_consumer_group.yaml b/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub_consumer_group.yaml index f82e23096d39..637c9d3ee663 100644 --- a/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub_consumer_group.yaml +++ b/sdk/iothub/azure-mgmt-iothub/tests/recordings/test_mgmt_iothub.test_iothub_consumer_group.yaml @@ -19,13 +19,13 @@ interactions: accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee?api-version=2019-07-01-preview response: body: - string: '{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee","name":"iot88d011ee","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothub_consumer_group88d011ee","properties":{"state":"Activating","provisioningState":"Accepted","enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee","name":"iot88d011ee","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothub_consumer_group88d011ee","properties":{"state":"Activating","provisioningState":"Accepted","enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo cache-control: - no-cache content-length: @@ -62,7 +62,7 @@ interactions: - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: body: string: '{"status":"Running"}' @@ -105,7 +105,7 @@ interactions: - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: body: string: '{"status":"Running"}' @@ -148,7 +148,7 @@ interactions: - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: body: string: '{"status":"Running"}' @@ -191,7 +191,7 @@ interactions: - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Devices/operationResults/b3NfaWhfZWM2YzVlZGMtNDExMy00NjIwLWI1ZmUtZmJjZDYyZDA2MDY2?api-version=2019-07-01-preview&operationSource=os_ih&asyncinfo response: body: string: '{"status":"Succeeded"}' @@ -234,10 +234,10 @@ interactions: - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 msrest_azure/0.4.34 azure-mgmt-iothub/0.8.2 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee?api-version=2019-07-01-preview response: body: - string: '{"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee","name":"iot88d011ee","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourcegroup":"test_mgmt_iothub_test_iothub_consumer_group88d011ee","etag":"AAAAAAh34R8=","properties":{"locations":[{"location":"West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee","name":"iot88d011ee","type":"Microsoft.Devices/IotHubs","location":"westus","tags":{},"subscriptionid":"00000000-0000-0000-0000-000000000000","resourcegroup":"test_mgmt_iothub_test_iothub_consumer_group88d011ee","etag":"AAAAAAh34R8=","properties":{"locations":[{"location":"West US","role":"primary"},{"location":"East US","role":"secondary"}],"state":"Active","provisioningState":"Succeeded","ipFilterRules":[],"hostName":"iot88d011ee.azure-devices.net","eventHubEndpoints":{"events":{"retentionTimeInDays":1,"partitionCount":4,"partitionIds":["0","1","2","3"],"path":"iot88d011ee","endpoint":"sb://iothub-ns-iot88d011e-2239563-4b368280db.servicebus.windows.net/"}},"routing":{"endpoints":{"serviceBusQueues":[],"serviceBusTopics":[],"eventHubs":[],"storageContainers":[]},"routes":[],"fallbackRoute":{"name":"$fallback","source":"DeviceMessages","condition":"true","endpointNames":["events"],"isEnabled":true}},"storageEndpoints":{"$default":{"sasTtlAsIso8601":"PT1H","connectionString":"","containerName":""}},"messagingEndpoints":{"fileNotifications":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"enableFileUploadNotifications":false,"cloudToDevice":{"maxDeliveryCount":10,"defaultTtlAsIso8601":"PT1H","feedback":{"lockDurationAsIso8601":"PT1M","ttlAsIso8601":"PT1H","maxDeliveryCount":10}},"features":"None"},"sku":{"name":"S1","tier":"Standard","capacity":2}}' headers: cache-control: @@ -282,10 +282,10 @@ interactions: accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee?api-version=2019-07-01-preview response: body: - string: '{"properties":{"created":"Sun, 29 Sep 2019 05:45:19 GMT"},"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee","name":"consumergrp88d011ee","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null}' + string: '{"properties":{"created":"Sun, 29 Sep 2019 05:45:19 GMT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee","name":"consumergrp88d011ee","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null}' headers: cache-control: - no-cache @@ -329,10 +329,10 @@ interactions: accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee?api-version=2019-07-01-preview response: body: - string: '{"properties":{"created":"Sun, 29 Sep 2019 05:45:19 GMT"},"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee","name":"consumergrp88d011ee","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null}' + string: '{"properties":{"created":"Sun, 29 Sep 2019 05:45:19 GMT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee","name":"consumergrp88d011ee","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null}' headers: cache-control: - no-cache @@ -374,11 +374,11 @@ interactions: accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups?api-version=2019-07-01-preview response: body: - string: '{"value":[{"properties":{"created":"Sun, 29 Sep 2019 05:44:44 GMT"},"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/%24Default","name":"$Default","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null},{"properties":{"created":"Sun, - 29 Sep 2019 05:45:19 GMT"},"id":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee","name":"consumergrp88d011ee","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null}]}' + string: '{"value":[{"properties":{"created":"Sun, 29 Sep 2019 05:44:44 GMT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/%24Default","name":"$Default","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null},{"properties":{"created":"Sun, + 29 Sep 2019 05:45:19 GMT"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee","name":"consumergrp88d011ee","type":"Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups","etag":null}]}' headers: cache-control: - no-cache @@ -422,7 +422,7 @@ interactions: accept-language: - en-US method: DELETE - uri: https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee?api-version=2019-07-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_iothub_test_iothub_consumer_group88d011ee/providers/Microsoft.Devices/IotHubs/iot88d011ee/eventHubEndpoints/events/ConsumerGroups/consumergrp88d011ee?api-version=2019-07-01-preview response: body: string: '' From a96099862c6c9479ecf7948d4a26cff81fe3295a Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Sun, 29 Sep 2019 14:25:59 +0800 Subject: [PATCH 8/8] updated history --- sdk/iothub/azure-mgmt-iothub/HISTORY.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sdk/iothub/azure-mgmt-iothub/HISTORY.rst b/sdk/iothub/azure-mgmt-iothub/HISTORY.rst index 3e0116c73516..170d5e311751 100644 --- a/sdk/iothub/azure-mgmt-iothub/HISTORY.rst +++ b/sdk/iothub/azure-mgmt-iothub/HISTORY.rst @@ -10,6 +10,18 @@ Release History - Model IotHubProperties has a new parameter locations +**General breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes if from some import. +In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. + +- IotHubClient cannot be imported from `azure.mgmt.iothub.iot_hub_client` anymore (import from `azure.mgmt.iothub` works like before) +- IotHubClientConfiguration import has been moved from `azure.mgmt.iothub.iot_hub_client` to `azure.mgmt.iothub` +- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.iothub.models.my_class` (import from `azure.mgmt.iothub.models` works like before) +- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.iothub.operations.my_class_operations` (import from `azure.mgmt.iothub.operations` works like before) + +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + 0.8.2 (2019-05-15) ++++++++++++++++++